Skip to content

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

@agracio

Description

@agracio

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

console.log("Hello nexe");

nexe

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

hello.exe
Hello nexe

Copying hello.exe to C:\Projects

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions