{"record":{"id":"8cd03ab8875d34e5","repo":"vercel/next.js","slug":"getstaticpaths-is-required-for-dynamic-ssg-pages-a","errorCode":null,"errorMessage":"getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.\nRead more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value","messagePattern":"getStaticPaths is required for dynamic SSG pages and is missing for '(.+?)'\\.\nRead more: https://nextjs\\.org/docs/messages/invalid-getstaticpaths-value","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/render.tsx","lineNumber":608,"sourceCode":"      'getServerSideProps cannot be used with \"output: export\". See more info here: https://nextjs.org/docs/advanced-features/static-html-export'\n    )\n  }\n\n  if (getStaticPaths && !pageIsDynamic) {\n    throw new Error(\n      `getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.` +\n        `\\nRead more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage`\n    )\n  }\n\n  if (!!getStaticPaths && !isSSG) {\n    throw new Error(\n      `getStaticPaths was added without a getStaticProps in ${pathname}. Without getStaticProps, getStaticPaths does nothing`\n    )\n  }\n\n  if (isSSG && pageIsDynamic && !getStaticPaths) {\n    throw new Error(\n      `getStaticPaths is required for dynamic SSG pages and is missing for '${pathname}'.` +\n        `\\nRead more: https://nextjs.org/docs/messages/invalid-getstaticpaths-value`\n    )\n  }\n\n  let asPath: string = renderOpts.resolvedAsPath || (req.url as string)\n\n  if (process.env.__NEXT_DEV_SERVER) {\n    const { isValidElementType } =\n      require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n    if (!isValidElementType(Component)) {\n      throw new Error(\n        `The default export is not a React Component in page: \"${pathname}\"`\n      )\n    }\n\n    if (!isValidElementType(App)) {\n      throw new Error(","sourceCodeStart":590,"sourceCodeEnd":626,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/server/render.tsx#L590-L626","documentation":"Guard in renderToHTMLImpl: the page is SSG with a dynamic pathname (contains [param] segments) but exports no getStaticPaths, so Next.js has no way to know which paths to prerender. The combination dynamic+SSG requires getStaticPaths to enumerate params, and its absence is rejected before rendering.","triggerScenarios":"Thrown at packages/next/src/server/render.tsx:610 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add `getStaticPaths` to the dynamic page that uses `getStaticProps`, returning the paths to pre-render and a `fallback` value."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89d017eac43ebf4742ed2b58d3c1373b70283b69","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}