{"record":{"id":"87ee1a9cf5c0d469","repo":"vercel/next.js","slug":"getstaticpaths-is-only-allowed-for-dynamic-ssg-pag","errorCode":null,"errorMessage":"getStaticPaths is only allowed for dynamic SSG pages and was found on '${pathname}'.\nRead more: https://nextjs.org/docs/messages/non-dynamic-getstaticpaths-usage","messagePattern":"getStaticPaths is only allowed for dynamic SSG pages and was found on '(.+?)'\\.\nRead more: https://nextjs\\.org/docs/messages/non-dynamic-getstaticpaths-usage","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/render.tsx","lineNumber":595,"sourceCode":"    throw new Error(SSG_GET_INITIAL_PROPS_CONFLICT + ` ${pathname}`)\n  }\n\n  if (hasPageGetInitialProps && getServerSideProps) {\n    throw new Error(SERVER_PROPS_GET_INIT_PROPS_CONFLICT + ` ${pathname}`)\n  }\n\n  if (getServerSideProps && isSSG) {\n    throw new Error(SERVER_PROPS_SSG_CONFLICT + ` ${pathname}`)\n  }\n\n  if (getServerSideProps && renderOpts.nextConfigOutput === 'export') {\n    throw new Error(\n      '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","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/vercel/next.js/blob/89d017eac43ebf4742ed2b58d3c1373b70283b69/packages/next/src/server/render.tsx#L577-L613","documentation":"Guard in renderToHTMLImpl: the page exports getStaticPaths, which enumerates dynamic route params, but the current pathname is not a dynamic route (no [param] segments) so there is nothing to enumerate. getStaticPaths is only meaningful for dynamic SSG pages, so the mismatch is rejected at render time.","triggerScenarios":"Thrown at packages/next/src/server/render.tsx:597 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Only use `getStaticPaths` on dynamic SSG pages (pages with bracket segments like [id].js) together with `getStaticProps`.","Remove `getStaticPaths` from the non-dynamic page."],"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"}