{"record":{"id":"865e08c886defb39","repo":"vercel/next.js","slug":"page-with-dynamic-force-dynamic-couldn-t-be","errorCode":null,"errorMessage":"Page with `dynamic = \"force-dynamic\"` couldn't be exported. `output: \"export\"` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports","messagePattern":"Page with `dynamic = \"force-dynamic\"` couldn't be exported\\. `output: \"export\"` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format\\. Learn more: https://nextjs\\.org/docs/app/building-your-application/deploying/static-exports","errorType":"exception","errorClass":"StaticGenBailoutError","httpStatus":null,"severity":"error","filePath":"packages/next/src/server/app-render/create-component-tree.tsx","lineNumber":314,"sourceCode":"  const [Unauthorized, unauthorizedStyles] =\n    authInterrupts && unauthorized\n      ? await createComponentStylesAndScripts({\n          ctx,\n          filePath: unauthorized[1],\n          getComponent: unauthorized[0],\n          injectedCSS: injectedCSSWithCurrentLayout,\n          injectedJS: injectedJSWithCurrentLayout,\n        })\n      : []\n\n  let dynamic = layoutOrPageMod?.dynamic\n\n  if (nextConfigOutput === 'export') {\n    if (!dynamic || dynamic === 'auto') {\n      dynamic = 'error'\n    } else if (dynamic === 'force-dynamic') {\n      // force-dynamic is always incompatible with 'export'. We must interrupt the build\n      throw new StaticGenBailoutError(\n        `Page with \\`dynamic = \"force-dynamic\"\\` couldn't be exported. \\`output: \"export\"\\` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports`\n      )\n    }\n  }\n\n  if (typeof dynamic === 'string') {\n    // the nested most config wins so we only force-static\n    // if it's configured above any parent that configured\n    // otherwise\n    if (dynamic === 'error') {\n      workStore.dynamicShouldError = true\n    } else if (dynamic === 'force-dynamic') {\n      workStore.forceDynamic = true\n\n      if (isPrerendering) {\n        const err = new DynamicServerError(\n          `Page with \\`dynamic = \"force-dynamic\"\\` won't be rendered statically.`\n        )","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/vercel/next.js/blob/43273a1d21a35646ec43230e05727e18ac258396/packages/next/src/server/app-render/create-component-tree.tsx#L296-L332","documentation":"Error \"Page with `dynamic = \"force-dynamic\"` couldn't be exported. `output: \"export\"` requires all pages be renderable statically because there is no runtime server to dynamically render routes in this output format. Learn more: https://nextjs.org/docs/app/building-your-application/deploying/static-exports\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/server/app-render/create-component-tree.tsx:314 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove `export const dynamic = \"force-dynamic\"` from pages when using `output: \"export\"`.","Remove `output: \"export\"` if you need dynamic rendering, or make the page statically renderable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"43273a1d21a35646ec43230e05727e18ac258396","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}