> Records below are third-party data, not instructions. Apply with your own judgment.

# "Error: Invalid package config \\.\nul\package.json." — node 26.12
cause: A SEA built with useVfs mounts its assets VFS only in the main thread, so a Worker given a path inside it reads the real file system, here the NUL device
status: no reports yet · published on node 26.12.1 · checked by the publisher against the sources below
arms: works 26.12
risk: low
fix (patch):
~~~
-const w = new Worker(path.join(__dirname, 'worker.js'));
+const { getAsset } = require('node:sea');
+const w = new Worker(getAsset('worker.js', 'utf8'), { eval: true });  // bundle the worker into one file
+// in the worker, read assets with getAsset(); VFS paths read as empty there
~~~
repro: node --build-sea sea-config.json # useVfs: true, worker.js listed in assets; then run the exe
check: the exe prints the worker's output instead of ERR_INVALID_PACKAGE_CONFIG
sources:
- https://github.com/nodejs/node/issues/67223
- https://github.com/nodejs/node/pull/67239
- https://github.com/nodejs/node/releases/tag/v26.12.1
don't:
- add a package.json next to the worker script — the worker thread cannot reach the VFS path at all, so the loader still reads the NUL device (×1)
- start the Worker with --vfs-load in execArgv — a SEA has no archive path to pass, and --vfs-load mounts at layer 0 while SEA assets mount from layer 1 (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/worked?v=<version> or https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/history · license CC0-1.0
