vercel/next.js · error · Error

Page " " is missing exported function…

Error message

Page "${page}" is missing exported function "generateStaticParams()", which is required with "output: export" config. See more info here: https://nextjs.org/docs/messages/generate-static-params

What it means

Error "Page "${page}" is missing exported function "generateStaticParams()", which is required with "output: export" config. See more info here: https://nextjs.org/docs/messages/generate-static-params" thrown in vercel/next.js.

Solutions

  1. Export generateStaticParams() from the dynamic page when using output: export.
Defensive patterns

Strategy: validation

When it happens

Trigger: A dynamic page lacks generateStaticParams with output: export.

Common situations: Using output: export with a dynamic segment page that does not export generateStaticParams.


AI-assisted analysis of vercel/next.js@996f957c06 (2026-08-19). Data as JSON: /api/errors/2e4d6755babf3783. Report an issue: GitHub.

Appendix: source

Thrown at packages/next/src/server/dev/next-dev-server.ts:800

        return pathsResult
      } finally {
        // we don't re-use workers so destroy the used one
        staticPathsWorker.end()
      }
    }
    const result = this.staticPathsCache.get(pathname)

    const nextInvoke = withCoalescedInvoke(__getStaticPaths)(
      `staticPaths-${pathname}`,
      []
    )
      .then(async (res) => {
        const { prerenderedRoutes, fallbackMode: fallback } = res.value

        if (isAppPath) {
          if (this.nextConfig.output === 'export') {
            if (!prerenderedRoutes) {
              throw new Error(
                `Page "${page}" is missing exported function "generateStaticParams()", which is required with "output: export" config. See more info here: https://nextjs.org/docs/messages/generate-static-params`
              )
            }

            if (
              !prerenderedRoutes.some((item) => item.pathname === urlPathname)
            ) {
              throw new Error(
                `Page "${page}" is missing param "${pathname}" in "generateStaticParams()", which is required with "output: export" config.`
              )
            }
          }
        }

        if (!isAppPath && this.nextConfig.output === 'export') {
          if (fallback === FallbackMode.BLOCKING_STATIC_RENDER) {
            throw new Error(
              'getStaticPaths with "fallback: blocking" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'

View on GitHub (pinned to 996f957c06)