gregrickaby / nextjs-github-pages

🚀 Deploy a Next.js app to GitHub Pages via GitHub Actions.
https://gregrickaby.github.io/nextjs-github-pages/
MIT License
448 stars 61 forks source link

Statci export in github pages does not work with dynamic #62

Closed abolfazlcodes closed 5 months ago

abolfazlcodes commented 5 months ago

Imagine having an articles page which has a single article as well which is dynamic [slug].tsx. During the build process, it throws this error:

Build error occurred Error: Page "/articles/[slug]" is missing "generateStaticParams()" so it cannot be used with the "output: export" config.

How should we handle this situation. It is app router not page router to use generateStaticParams()

gregrickaby commented 5 months ago

Hey @abolfazlcodes, dynamic features are not supported with static exports: https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features