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
What happened:
It is still unclear how to bundle node_modules inside executable. Checking code of nexe shows that there is VirtualFS implementation. However, a packed application points to the file system and is looking in current folder for node_modules folder
What you expected to happen:
Is there a way to use node_modules from packed executable in case of attaching the folder via --resource node_modules ?
the correct behaviour with node_modules in the same folder where exe sits:
Error: ENOENT: no such file or directory, open '/tmp/node_modules/pino/lib/worker.js'
at Object.openSync (node:fs:582:18)
at Object.readFileSync (node:fs:461:35)
at readFileSync (/tmp/datahub-cli:233:55)
at getSourceSync (node:internal/modules/esm/load:85:14)
at getSource (node:internal/modules/esm/translators:72:10)
at createCJSModuleWrap (node:internal/modules/esm/translators:300:32)
at ModuleLoader.commonjsStrategy (node:internal/modules/esm/translators:379:10)
at async link (node:internal/modules/esm/module_job:78:21)
Emitted 'error' event on ThreadStream instance at:
at Immediate. (/tmp/node_modules/thread-stream/index.js:369:12)
at process.processImmediate (node:internal/timers:478:21)
Node.js v20.12.2 How to reproduce it (as minimally and precisely as possible):
What happened:
It is still unclear how to bundle node_modules inside executable. Checking code of nexe shows that there is VirtualFS implementation. However, a packed application points to the file system and is looking in current folder for node_modules folder
What you expected to happen:
Is there a way to use node_modules from packed executable in case of attaching the folder via --resource node_modules ?
the correct behaviour with node_modules in the same folder where exe sits:
heelo
/app/logs/w-gen.log
Hello World
instead of
root@e5dde1e2895e:/app# /tmp/test-cli
heelo
/app/logs/w-gen.log
Hello World
node:events:496
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, open '/tmp/node_modules/pino/lib/worker.js'
at Object.openSync (node:fs:582:18)
at Object.readFileSync (node:fs:461:35)
at readFileSync (/tmp/datahub-cli:233:55)
at getSourceSync (node:internal/modules/esm/load:85:14)
at getSource (node:internal/modules/esm/translators:72:10)
at createCJSModuleWrap (node:internal/modules/esm/translators:300:32)
at ModuleLoader.commonjsStrategy (node:internal/modules/esm/translators:379:10)
at async link (node:internal/modules/esm/module_job:78:21)
Emitted 'error' event on ThreadStream instance at:
at Immediate. (/tmp/node_modules/thread-stream/index.js:369:12)
at process.processImmediate (node:internal/timers:478:21)
Node.js v20.12.2
How to reproduce it (as minimally and precisely as possible):
package.json
main.js
Anything else we need to know?:
Environment:
macos 14 arm and "Debian GNU/Linux 10 (buster)"
v20.12.x also tried with v16.20.2
command to build:
npx nexe ./main.js --cwd=. --resource "./node_modules/**/*" -o datahub-cli --build=true --python=$(which python3) --verbose --logLevel=debug
The text was updated successfully, but these errors were encountered: