#1118·nexe

.js file is still required by .exe packaged with nexe

Author: agracioCreated Feb 26, 2025Updated Sep 8, 2026

Not sure if this is a bug or more likely a user error.

  • Windows 10
  • Node.js 22.11.0
  • nexe 4.0.0-rc.6 - installed using npm i -g nexe

hello.js

javascript
console.log("Hello nexe");

nexe

bash
nexe hello.js --build -o hello.exe
i nexe 4.0.0-rc.6
(node:28648) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created)
√ Already downloaded...
√ Compiling result
√ Entry: 'hello.js' written to: hello.exe
√ Finished in 0.153s

executing in the same directory

bash
hello.exe
Hello nexe

Copying hello.exe to C:\Projects

bash
hello.exe
node:internal/modules/cjs/loader:1274
  throw err;
  ^

Error: Cannot find module 'C:\Projects\hello.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1271:15)
    at Function._load (node:internal/modules/cjs/loader:1097:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:240:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.11.0

As per project description I am expecting all .js files to be packaged inside single executable .exe unless I misunderstand some basics.