Report #8329
[bug\_fix] Page is missing generateStaticParams with output: 'export'
Implement and export generateStaticParams function that returns an array of param objects matching the dynamic route segments. Root cause: Static export \(SSG\) requires all dynamic routes to be enumerated at build time; there is no server to handle dynamic requests.
Journey Context:
You configure next.config.js with output: 'export' to deploy to AWS S3. You have a route at app/blog/\[slug\]/page.tsx. You run next build and it crashes with 'Page is missing generateStaticParams so it cannot be used with output export'. You think it's a bug because you have revalidate = 60, but that's for ISR, not static export. You try adding dynamic = 'force-static', but that still requires the params. You search GitHub issues and find you must export a function generateStaticParams that returns \[\{ slug: 'hello' \}, \{ slug: 'world' \}\]. You fetch your posts from CMS inside this function \(which runs at build time\). If you have a catch-all route \[\[...slug\]\], you must return \[\{ slug: \['a', 'b'\] \}\]. The build succeeds and generates static HTML files in out/.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:14:27.273794+00:00— report_created — created