Repository navigation
Turbopack build panic hides null-byte environment variable spawn error and points at unrelated CSS module #95240
abdoufma
started this conversation in
Turbopack Error Report
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Link to the code that reproduces this issue
Private application, but the failure appears environment-dependent rather than source-dependent. I can provide more details if needed.
To Reproduce
On one Windows machine,
next buildwith Turbopack fails during CSS processing when the parent process environment contains an inherited env var with an embedded NUL byte.Environment variable observed by Node:
Detection command:
Output:
Run:
The project imports a normal package stylesheet globally:
import "@eigenpal/docx-editor-react/styles.css";
The installed CSS file itself does not contain NUL bytes.
Current Behavior
Turbopack writes a panic log (
Failed to write app endpoint /page)Caused by:
Full relevant chain:
parse_css
PostCssTransformedAsset::process
evaluate_webpack_loader
creating new process
spawning node pooled process
nul byte found in provided data
This makes the failure look like a corrupted CSS file or package issue, but the actual root cause is the inherited env var containing a NUL byte.
Running the same project with Webpack surfaces the real Node error:
Expected Behavior
Turbopack should surface the underlying spawn/env error with the offending env key, similar to the Webpack path, instead of attributing the failure to the CSS module.
Ideally, the panic would say something like:
Environment
OS: Windows 10 Pro 64-bit, build 26200
Node: v24.10.0
npm: 11.6.1
Next.js: 16.1.6
React: 18.2.0
Package involved in reported CSS path: @eigenpal/docx-editor-react@1.0.2
Additional Context
The issue is not that Turbopack should necessarily support malformed environment variables. The bug report is mainly about diagnostics: Turbopack’s panic
points at an unrelated CSS file and does not expose the actionable env var name, while Webpack reports the actual spawn error.
Auto-generated report:
Turbopack version:
23c46498Next.js version:
0.0.0Error message:
All reactions