diff --git a/packages/next/server/config-utils.ts b/packages/next/server/config-utils.ts index c10de887d58e6a8..3b960bb0f143f80 100644 --- a/packages/next/server/config-utils.ts +++ b/packages/next/server/config-utils.ts @@ -4,6 +4,7 @@ import * as Log from '../build/output/log' import { CheckReasons, CheckResult } from './config-utils-worker' import { install, shouldLoadWithWebpack5 } from './config-utils-worker' import { PHASE_PRODUCTION_SERVER } from '../shared/lib/constants' +import { getNodeOptionsWithoutInspect } from './lib/utils' export { install, shouldLoadWithWebpack5 } @@ -31,7 +32,7 @@ export async function loadWebpackHook(phase: string, dir: string) { forkOptions: { env: { ...process.env, - NODE_OPTIONS: '', + NODE_OPTIONS: getNodeOptionsWithoutInspect(), }, }, }