- Symptom
- Build error linking to /docs/messages/empty-generate-static-paramsA dynamic route that deferred all paths to runtime with return [] stops buildingRemoving generateStaticParams makes the build pass but the route renders on every request
- Cause
- Under cacheComponents, Next.js needs at least one param to prerender and validate the route's static shell. The old pattern of returning [] to defer everything is now an error.
- Fix
- Return at least one real param. Unlisted params are still rendered at request time. Keep the export, because deleting it opts the route out of ISR.
- Apply
export async function generateStaticParams() { const posts = await getPosts() return posts.slice(0, 1).map((p) => ({ slug: p.slug })) }- Affected
- Next.js 16.x with cacheComponents: true
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders