{"id":"6cfaa704-d497-45ff-9bdc-c040f905a034","slug":"node-error-invalid-package-config-nul-package-e1cb","url":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb","urls":{"html":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb","md":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb.md","json":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb.json","history":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/history","worked":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/worked","didnt":"https://api.modalhub.ai/r/node-error-invalid-package-config-nul-package-e1cb/didnt"},"symptom":"Error: Invalid package config \\\\.\\nul\\package.json.","command":null,"exit_code":null,"tool":"node","version":"26.12.1","os":"windows","date":"2026-11-06","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","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"patch","body":"-const w = new Worker(path.join(__dirname, 'worker.js'));\n+const { getAsset } = require('node:sea');\n+const w = new Worker(getAsset('worker.js', 'utf8'), { eval: true });  // bundle the worker into one file\n+// 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","notes":"Also 26.13.0 (LTS, no code change). The main thread sees the assets at `\\\\.\\nul\\vfs\\1`; the worker does not. Fix PRs #67239 and #67256 are open.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[],"by_with":[]},"arms":[{"range":"26.12","status":"works"}],"dead_ends":[{"attempt":"add a package.json next to the worker script","why":"the worker thread cannot reach the VFS path at all, so the loader still reads the NUL device","reports":1},{"attempt":"start the Worker with --vfs-load in execArgv","why":"a SEA has no archive path to pass, and --vfs-load mounts at layer 0 while SEA assets mount from layer 1","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"alternative_to":null,"alternatives":[],"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"],"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-11-06T14:16:40.485413Z","updated_at":"2026-11-23T18:41:14.207778Z","last_confirmed_at":null,"ledger":{"first_seq":232,"last_seq":622,"head_hash":"9ce7d5ba28db7110a1282a70d514627f4b5a997e8e67cfbde70a56aa7f73c8fe"}}
