After some investigation I found out that I have to set webpack to version 4 in my next.config.js. The latest Next.js uses webpack 5 as default which is not working with AWS Amplify Hosting right now.
Yes, you're right. Downgrading Next.js to v11.1.3 and setting webpack5: false in next.config.js fixed the issue.
webpack5: false
Some comments have been hidden by the post's author - find out more
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
After some investigation I found out that I have to set webpack to version 4 in my next.config.js.
The latest Next.js uses webpack 5 as default which is not working with AWS Amplify Hosting right now.
Yes, you're right. Downgrading Next.js to v11.1.3 and setting
webpack5: false
in next.config.js fixed the issue.