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

Viewed 1485

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 ...
2 Answers

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.

Related