-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy Steps failure #2073
Comments
Hi 👋, thanks for opening! While we look into this... If this issue is related to custom domains, be sure to check the custom domains troubleshooting guide to see if that helps. Also, there is a more general troubleshooting FAQ that may be helpful for other questions. Lastly, please make sure you've specified the |
Same case man, looks like Amplify switch to SSR mode instead-of SSG, and I have no clue how to turn it back to SSG as it was previously |
Man I found solution here https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md#convert-an-ssr-app-to-ssg |
I believe that AWS team will place this option in UI instead of just cover it in CLI and a few lines in FAQ |
Hi, @paulcookie is correct, this is our current workaround for switching an app from SSR back to SSG: https://github.com/aws-amplify/amplify-console/blob/master/FAQ.md#convert-an-ssr-app-to-ssg. What happens is that at some point your app was created as SSR but now it's being built as SSG because of the If you intend for the app to continue as SSG, please follow the steps above for now. |
Any updates on this? Our website has never been SSR. AWS fixed this for us twice but we have hit it again for the first time. The issue seems to occur for us every five weeks. |
Before opening, please confirm:
App Id
d3eyxgyk7b3qii
Region
us-east-2
Amplify Console feature
Build settings
Describe the bug
2021-07-20T19:06:56 [INFO]: Beginning deployment for application d3eyxgyk7b3qii, branch:dev, buildId 0000000317
2021-07-20T19:06:56 [INFO]: Cannot find any generated SSR resources to deploy. If you intend for your app to be SSR, please check your app Service Role permissions. Otherwise, please check out our docs on how to setup your app to be detected as SSG (https://docs.aws.amazon.com/amplify/latest/userguide/server-side-rendering-amplify.html#deploy-nextjs-app)
Expected behavior
Deploy step should be finished successfully
Reproduction steps
2021-07-20T19:06:56 [INFO]: Beginning deployment for application d3eyxgyk7b3qii, branch:dev, buildId 0000000317
2021-07-20T19:06:56 [INFO]: Cannot find any generated SSR resources to deploy. If you intend for your app to be SSR, please check your app Service Role permissions. Otherwise, please check out our docs on how to setup your app to be detected as SSG (https://docs.aws.amazon.com/amplify/latest/userguide/server-side-rendering-amplify.html#deploy-nextjs-app)
It started failing since yesterday but it has been working before that.
Build Settings
Additional information
This our build steps
and following code is used for setting environment variables, but it is not executed at the moment with amplify settings:
`#!/bin/node
const fs = require("fs");
const childProcess = require("child_process");
const environment = process.argv[2];
const nextCommand = process.argv[3];
let envPath = "";
if (environment == "local") envPath = "env/.env.local";
else if (environment == "dev") envPath = "env/.env.development";
else if (environment == "prod") envPath = "env/.env.production";
else if (environment == "preview") envPath = "env/.env.preview";
else envPath = "env/.env.development";
console.log("testing", environment);
if (environment == "local") {
nextBuild((message) => {
console.log(message);
if (nextCommand === "build") {
nextExport((message) => {
console.log(message);
});
}
});
} else {
try {
const file = fs.readFileSync(envPath, "utf8");
if (file) {
fs.writeFileSync(".env", file);
}
} catch (err) {
console.log(err);
}
// nextBuild((message) => {
// console.log(message);
// if (nextCommand === "build") {
// nextExport((message) => {
// console.log(message);
// });
// }
// });
}
function nextBuild(onSuccess) {
childProcess
.spawn("env-cmd", ["-f", envPath, "next", nextCommand], {
stdio: "inherit",
shell: true,
})
.on("exit", function (error) {
if (!error) {
onSuccess("----- Build Success! -----");
}
});
}
function nextExport(onSuccess) {
childProcess
.spawn("env-cmd", ["-f", envPath, "next", "export"], {
stdio: "inherit",
shell: true,
})
.on("exit", function (error) {
if (!error) {
onSuccess("----- Exported Successfully -----");
}
});
}`
The text was updated successfully, but these errors were encountered: