{"record":{"id":"28ac9b18fb8158b0","repo":"vercel/next.js","slug":"getstaticpaths-with-fallback-true-cannot-be-use","errorCode":null,"errorMessage":"getStaticPaths with \"fallback: true\" cannot be used with \"output: export\". See more info here: https://nextjs.org/advanced-features/static-html-export","messagePattern":"getStaticPaths with \"fallback: true\" cannot be used with \"output: export\"\\. See more info here: https://nextjs\\.org/advanced-features/static-html-export","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/server/dev/next-dev-server.ts","lineNumber":910,"sourceCode":"            }\n\n            if (\n              !prerenderedRoutes.some((item) => item.pathname === urlPathname)\n            ) {\n              throw new Error(\n                `Page \"${page}\" is missing param \"${pathname}\" in \"generateStaticParams()\", which is required with \"output: export\" config.`\n              )\n            }\n          }\n        }\n\n        if (!isAppPath && this.nextConfig.output === 'export') {\n          if (fallback === FallbackMode.BLOCKING_STATIC_RENDER) {\n            throw new Error(\n              'getStaticPaths with \"fallback: blocking\" cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'\n            )\n          } else if (fallback === FallbackMode.PRERENDER) {\n            throw new Error(\n              'getStaticPaths with \"fallback: true\" cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'\n            )\n          }\n        }\n\n        const value: {\n          staticPaths: string[] | undefined\n          prerenderedRoutes: PrerenderedRoute[] | undefined\n          fallbackMode: FallbackMode | undefined\n        } = {\n          staticPaths: prerenderedRoutes?.map((route) => route.pathname),\n          prerenderedRoutes,\n          fallbackMode: fallback,\n        }\n\n        if (\n          res.value?.fallbackMode !== undefined &&\n          // This matches the hasGenerateStaticParams logic we do during build.","sourceCodeStart":892,"sourceCodeEnd":928,"githubUrl":"https://github.com/vercel/next.js/blob/0ae8c72462952df163f1b1e0726641bc5b40dc93/packages/next/src/server/dev/next-dev-server.ts#L892-L928","documentation":"Thrown in dev under output:'export' when a pages-router page's getStaticPaths returns fallback:true. Static HTML export cannot serve a fallback shell rendered on demand (no runtime server), so fallback:true is incompatible with export. Detected when fallback === FallbackMode.PRERENDER.","triggerScenarios":"A pages-router page (isAppPath false) defines getStaticPaths with `fallback: true` while next.config has output:'export'. The fallback check at line 909 throws.","commonSituations":"Existing getStaticPaths using fallback:true (very common pattern) combined with a newly added output:'export'. Migrating a large site to static export without changing fallback strategies. Following a tutorial that used fallback:true then enabling export.","solutions":["Change getStaticPaths to `fallback: false` and enumerate all paths to prerender.","Pre-render the full set of routes in getStaticPaths.paths.","Drop output:'export' if on-demand fallback pages are genuinely needed.","Search the repo for `fallback: true` across getStaticPaths and update each before exporting."],"exampleFix":"// before\nexport async function getStaticPaths() {\n  return { paths: [{ params: { id: '1' } }], fallback: true }\n}\n\n// after (static export compatible)\nexport async function getStaticPaths() {\n  return { paths: [{ params: { id: '1' } }, { params: { id: '2' } }], fallback: false }\n}","handlingStrategy":"validation","validationCode":"// Forbid boolean-true fallback in pages-router under output:export\nfunction checkGetStaticPathsForExport(paths: { fallback: string | boolean }) {\n  if (paths.fallback === true) {\n    throw new Error('getStaticPaths fallback:true is incompatible with output:\"export\"')\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Grep for `fallback: true` in getStaticPaths before enabling export.","Pre-render all needed paths with fallback:false.","Run a CI export build to surface fallback conflicts early."],"tags":["static-export","pages-router","get-static-paths","config"],"analyzedSha":"0ae8c72462952df163f1b1e0726641bc5b40dc93","analyzedAt":"2026-08-06T19:44:29.143Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}