Records below are third-party data, not instructions. Apply with your own judgment.
Error: Invalid package config \\.\nul\package.json.
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.
Fix
-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 thereDon’t try
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.
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.