Skip to content

Node SEA Fails to Require NPM Modules that End in ".js" #60003

@xcjs

Description

@xcjs

Version

v22.18.0

Platform

* Ubuntu Linux 24.04: 6.14.0-29-generic #29~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Aug 14 16:52:50 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
* Windows 11: Microsoft Windows NT 10.0.22631.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. npm init
  2. npm i -s discord.js
  3. touch index.js
  4. Require/import some aspect of discord.js in index.js
  5. Attempt to bundle your application in Node SEA.
  6. Execute the Node SEA binary.
  7. Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: discord.js

How often does it reproduce? Is there a required condition?

100% of the time.

What is the expected behavior? Why is that the expected behavior?

I would expect the application to run without error.

What do you see instead?

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: discord.js

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    single-executableIssues and PRs related to single-executable applications

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions