{"record":{"id":"b9cd0d518afa8d4d","repo":"vercel/next.js","slug":"prerendering-is-running-in-debug-mode-with-node-en","errorCode":null,"errorMessage":"Prerendering is running in debug mode with NODE_ENV='development'. This will affect performance and should not be used for production.","messagePattern":"Prerendering is running in debug mode with NODE_ENV='development'\\. This will affect performance and should not be used for production\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/cli/next-build.ts","lineNumber":86,"sourceCode":"    printAndExit(\n      '--experimental-analyze is only compatible with the Turbopack bundler.'\n    )\n  }\n\n  if (!mangling) {\n    warn(\n      `Mangling is disabled. ${italic('Note: This may affect performance and should only be used for debugging purposes.')}`\n    )\n  }\n\n  if (profile) {\n    warn(\n      `Profiling is enabled. ${italic('Note: This may affect performance.')}`\n    )\n  }\n\n  if (debugPrerender) {\n    warn(\n      `Prerendering is running in debug mode with NODE_ENV='development'. ${italic(\n        'This will affect performance and should not be used for production.'\n      )}`\n    )\n  }\n\n  if (experimentalDebugMemoryUsage) {\n    process.env.EXPERIMENTAL_DEBUG_MEMORY_USAGE = '1'\n    enableMemoryDebuggingMode()\n  }\n\n  const dir = getProjectDir(directory)\n\n  if (!existsSync(dir)) {\n    printAndExit(`> No such directory exists as the project root: ${dir}`)\n  }\n\n  let debugBuildPathsPatterns: string[] | undefined","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/cli/next-build.ts#L68-L104","documentation":"Warning printed by next-build when the --debug-prerender flag is used. It indicates the build compiles prerendering code in development mode (NODE_ENV=development) to yield richer debugging output for hydration or prerender failures. This makes the output unsuitable for deployment: the resulting build is slower and lacks production optimizations, and is meant only for diagnosing prerender errors.","triggerScenarios":"Thrown at packages/next/src/cli/next-build.ts:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not use debug prerender mode for production builds; run `next build` normally for production output."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}