vercel/next.js · error
Prerendering is running in debug mode with NODE_ENV='develop
Error message
Prerendering is running in debug mode with NODE_ENV='development'. This will affect performance and should not be used for production.
What it means
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.
Source
Thrown at packages/next/src/cli/next-build.ts:86
printAndExit(
'--experimental-analyze is only compatible with the Turbopack bundler.'
)
}
if (!mangling) {
warn(
`Mangling is disabled. ${italic('Note: This may affect performance and should only be used for debugging purposes.')}`
)
}
if (profile) {
warn(
`Profiling is enabled. ${italic('Note: This may affect performance.')}`
)
}
if (debugPrerender) {
warn(
`Prerendering is running in debug mode with NODE_ENV='development'. ${italic(
'This will affect performance and should not be used for production.'
)}`
)
}
if (experimentalDebugMemoryUsage) {
process.env.EXPERIMENTAL_DEBUG_MEMORY_USAGE = '1'
enableMemoryDebuggingMode()
}
const dir = getProjectDir(directory)
if (!existsSync(dir)) {
printAndExit(`> No such directory exists as the project root: ${dir}`)
}
let debugBuildPathsPatterns: string[] | undefinedView on GitHub (pinned to 0eb3775416)
Solutions
- Do not use debug prerender mode for production builds; run `next build` normally for production output.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at packages/next/src/cli/next-build.ts:86 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19).
Data as JSON: /api/errors/b9cd0d518afa8d4d.
Report an issue: GitHub.