-
Notifications
You must be signed in to change notification settings - Fork 112
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
Next.js APP router SSG #3872
Comments
I am having the same issue. @calavera any tips? Thanks in advance. |
I think I found a solution:
Hope this helps you with your case too |
Amplify detect config Your SSG app when builded sucess => export folder Bug: When Reason: because Nextjs 14 is change way to build SSG page. They remove Way i fixed that:
Key: Make sure Amplify detect your app build is SSG. |
Before opening, please confirm:
App Id
d1fn6pdw73hgp
AWS Region
ap-southeast-1
Amplify Hosting feature
Build settings
Frontend framework
Next.js
Next.js version
13.4.12
Next.js router
App Router
Describe the bug
I tried to convert the Next.js SSR to SSG by following the FAQ. However the app platform and branch framework always change back to Web dynamic and Next.js SSR during the build.
After I added command
- envCache --set stackInfo ""
, the platform and framework seems not change back, but the frontend build doesn't start becausenext export
does not work with App Router.If I change to
next build
and configure the "output: export" in next.config.js, the build works locally but Amplify changes the app to web platform and SSR.Expected behavior
Can deploy Next.js App Router SSG app.
Reproduction steps
Build Settings
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: