How to deploy Next.js in Amplify?

Viewed 1491

I don't know why this happens.

2021-09-18T00:04:20 [INFO]: Beginning deployment for application dhq4kye8grbzc, branch:main, buildId 0000000028

2021-09-18T00:04:20 [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 )

2021-09-18T00:04:20 [ERROR]: {"code":"7","message":"No ssrResources.json file"}

enter image description here

3 Answers

So, I fixed it by myself I was facing the same issue. The main problem is you are setting Next version: 11 which is not possible. As of today, we can either use 9,10 or the latest. So latest basically means version 11.

The configuration can be updated in Build Setting in your Amplify Console Platform Dashboard.

Related