Page is missing generateStaticParams() (output: export) Next.js Origin: On your device OSI layer 7 · Application Last updated 5 Nov 2026

Next.js: Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" config

A dynamic route can't be statically exported without telling Next.js which paths to generate.

Exact message you may see Page "/blog/[slug]" is missing "generateStaticParams()" so it cannot be used with "output: export" configis missing generateStaticParams() so it cannot be used with output: exportPage is missing exportPathMap for dynamic routeError: Page with `dynamic = "force-dynamic"` couldn't be exported. `output: "export"` requires all pages be renderable statically
Seen on: Next.js React

Meaning

With output: 'export' every dynamic segment needs generateStaticParams() returning all params at build time (and dynamicParams = false if you want 404s for others). Or drop output: 'export' and use server rendering.

Common causes

  • output: "export" with dynamic routes
  • generateStaticParams missing or returns empty
  • Data fetch for params failing at build
  • Using server-only features with export
  • Wrong segment names

⚡ Quick fix

  1. export async function generateStaticParams() { return posts.map(p => ({ slug: p.slug })) }
  2. Add export const dynamicParams = false
  3. Remove output: "export" if you need runtime routes

Detailed fix by platform

Next.js

  1. export const dynamicParams = false; export async function generateStaticParams() { return [{ slug: "a" }, { slug: "b" }]; }

How to diagnose

  1. Export — output: export?
  2. Params — Listed?
  3. Alternative — Server hosting?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

[Vue warn]: Component is missing template or render function — Vue: [Vue warn]: Component is missing template or render function. (Vue)[Vue warn]: Component…Component provided template option but runtime compilation is not supported — Vue: [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js" (Vue)Component provided te…Could not find a production build in the '.next' directory — Next.js: Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server (Next.js)Could not find a prod…Failed to compile: ESLint errors during next build — Next.js: Failed to compile. ./src/app/page.tsx 12:7 Error: 'x' is assigned a value but never used. @typescript-eslint/no-unused-vars (Next.js)Failed to compile: ES…Failed to fetch font from Google Fonts — Next.js: ⨯ Failed to download `Inter` from Google Fonts. Using fallback font instead / FetchError: request to https://fonts.googleapis.com failed (Next.js)Failed to fetch font …Feature flags __VUE_OPTIONS_API__ not explicitly defined (esm-bundler) — Vue: You are running the esm-bundler build of Vue — configure your bundler to explicitly replace feature flag globals (__VUE_OPTIONS_API__) (Vue)Feature flags __VUE_O…Features not supported with output: export (headers, redirects, image loader) — Next.js: Specified "headers" cannot be used with "output: export" / Image Optimization using the default loader is not compatible with `{ output: 'export' }` (Next.js)Features not supporte…Module not found: Can't resolve 'x' (Next.js build) — Next.js: Module not found: Can't resolve '@/components/Button' / 'lodash' in '/app/src' (Next.js)Module not found: Can…Page is m…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.