简体   繁体   中英

Unable to Deploy Next Js SSR app on AWS amplify. ( Internal error on Website and Deployment failed on cli)

I use

  • CLI method
  • and GUI method ( From AWS website )

When I use CLI method it says:

 Zipping artifacts completed.
⠦ Deploying build artifacts to the Amplify Console..Job failed.{"jobArn":"arn:aws:amplify:eu-central-1:-----:apps/------","jobId":"1","commitId":null,"commitMessage":"Deployment failed","commitTime":null,"startTime":"2021-06-28T12:16:39.969Z","status":"FAILED","endTime":null,"jobType":null}
✔ Deployment complete!

And When I use AWS Website Then it makes the build and after that, it gives an error like

  • Starting SSR build...
  • Internal Error...
  • Terminate Logging...

First off, it's worth noting that the Amplify team has only recently started getting this working, so there are definitely still flaws in the slaw. With that said, I learned in my own project that you need to be using no higher than version "10.2.0" of Next.js right now. Anything newer than that will not build at the moment. As mentioned above, I am sure as they work out the issues they will start supporting newer versions.

Secondly, I would encourage you to join their Discord server where you can get additional support from the Amplify developers as well as other developers who are actively using the product and working together to sort out some of these issues.

I just encountered the same error today and here below are the findings:

Amplify Hosting does not support manual deploys for server-side rendered (SSR) apps.

https://docs.aws.amazon.com/amplify/latest/userguide/manual-deploys.html

If you navigate to AWS Console -> Amplify -> All apps -> (Your next.js app) -> Hosting environments -> (Click the env, eg dev ), then scroll down to the bottom of the page, you should be able to find some logs saying "Amplify does not support Manual Deploys for SSR.".

Furthermore, here is a recent AWS tutorial that may shed some light: Deploy a Next.js 13 app to AWS with Amplify Hosting

如果您使用增量静态页面生成,那么您应该将代码部署到 vercel,这里是参考https://nextjs.org/docs/messages/ssg-fallback-true-export

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM