You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
socket npm run build crashes with ERR_MISSING_OPTION: --permission on Node v24 + Next.js #1160
Node.js silently ignores the garbled tokens. However, Next.js re-parses NODE_OPTIONS for its build workers using a tokenizer that splits on whitespace and only handles " as string delimiters, not '. This causes:
socket npm run build → crashes at "Running TypeScript ..."
TypeError [ERR_MISSING_OPTION]: --permission is required
at node:internal/process/pre_execution:656:15
at Array.forEach (<anonymous>)
at initializePermission (node:internal/process/pre_execution:653:5)
Fixed on the v1.x branch in 908dd4c — it drops the single quotes exactly as you suggested, so --permission stays a clean standalone token instead of arriving as '--permission and being dropped by Next.js's NODE_OPTIONS tokenizer. Unit tests on the extracted buildNpmNodeOptionsArg helper assert the value is never quoted. It ships in the next v1.x release (npm is still on 1.1.153), so I'm leaving this open until you can confirm against your Next.js build on Node 24.
Activity
fix(optimize): preserve inherited NODE_OPTIONS in agent installer
fix(optimize): preserve inherited NODE_OPTIONS in agent installer
fix(optimize): preserve inherited NODE_OPTIONS in agent installer
fix(optimize): preserve inherited NODE_OPTIONS in agent installer (#1435
fix(npm): merge NODE_OPTIONS and drop quotes in shadow --node-options
fix(npm): merge NODE_OPTIONS and drop quotes in shadow --node-options
fix(npm): merge NODE_OPTIONS and drop quotes in shadow --node-options
fix(npm): merge NODE_OPTIONS and drop quotes in shadow --node-options
jdalton commentedon Aug 5, 2026
Fixed on the
v1.xbranch in 908dd4c — it drops the single quotes exactly as you suggested, so--permissionstays a clean standalone token instead of arriving as'--permissionand being dropped by Next.js's NODE_OPTIONS tokenizer. Unit tests on the extractedbuildNpmNodeOptionsArghelper assert the value is never quoted. It ships in the next v1.x release (npm is still on 1.1.153), so I'm leaving this open until you can confirm against your Next.js build on Node 24.