Next.js · build error
missing generateStaticParams() with output: export
Error: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config.What it means
A static export has no server, so every dynamic route has to list its pages at build time.
Common causes
- A new [slug] or [id] route in a site deployed as static files
- generateStaticParams exists but sits in a "use client" page
How to fix it
- Export generateStaticParams() from the page and return every slug
- If the route really needs a server (per-user data), drop output: export and deploy to a host that runs Next.js
export async function generateStaticParams() {
const posts = await getPosts();
return posts.map((p) => ({ slug: p.slug }));
}Prompt for Cursor or Claude Code
next build fails because a dynamic route has no generateStaticParams and the app uses output: export. Add generateStaticParams that returns every value for this route from the same data source the page reads.Not quite your error? Paste yours into the free VibeBoot Doctor or browse the Next.js error fixer.
next: skip the next one
Skip the setup. The VibeBoot SaaS Starter gives you auth, Stripe and a database already wired on Next.js 16.4.3, with AGENTS.md and .cursor/rules that keep your agent on the Next.js 16 conventions. $49, one-time.
14-day money-back guarantee · lifetime updates
Other Next.js errors
- useState / useEffect in a Server Component
- Event handlers cannot be passed to Client Component props
- Functions cannot be passed directly to Client Components
- Only plain objects can be passed to Client Components
- "use client" must be placed before other expressions
- export "metadata" from a "use client" page
$ fixed it? get the next one first
New fixes for what AI agents break, by email.
When we add a fix or a Cursor rule for a new Next.js, Auth.js, Prisma or Stripe break, it goes out in the VibeBoot newsletter. Free, occasional, unsubscribe in one click.