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
{{ message }}
Repository navigation
Best practice for Node SEA with ESM-only CLI, Workers, and native addons #5129
I’m looking for guidance around Single Executable Applications (SEA) when combining ESM-only code, Worker threads, and native addons.
Background
I’m developing a production CLI tool using:
TypeScript
ESM-only codebase ("type": "module")
Node.js Worker threads
Several ESM-only dependencies (ink, chalk@5, yoga-layout, etc.)
A custom npm package with native addons (.node), also maintained by me and published using node-pre-gyp with prebuilt binaries per platform
The CLI and the native-addon package both work correctly when run via a normal Node.js installation.
What I tried with SEA
Built a CJS output of the CLI (using tsup / tsc)
Used Node.js v20.11.x consistently to:
- generate the SEA blob (--experimental-sea-config)
- inject it into a Node binary using postject
Pointed sea-config.json to the CJS entry (dist/index.cjs)
This works upto a point The sea binary starts
but then i am getting error that my addon package is not found and require is not working for loading chalk and others.
node:internal/util/embedding:48
throw new ERR_UNKNOWN_BUILTIN_MODULE(id);
^
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: @pinggy/pinggy
at embedderRequire (node:internal/util/embedding:48:11)
at dist_sea/index.cjs:833:22
at embedderRunCjs (node:internal/util/embedding:37:10)
at node:internal/main/embedding:18:8 {
code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}
Node.js v20.11.1
Core questions
Is SEA expected to support loading native addons from node_modules at runtime?
Is there any official or recommended way for esm-first CLI using SEA( especially with Workers) ?
Any guidance or confirmation from the Node.js team would be greatly appreciated.
Minimal Reproduction
No response
Output
No response
Before You Submit
I have looked for issues that already exist before submitting this
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.
Activity
Ranjithh44 commentedon Feb 2, 2026
parsapy1391-lang commentedon Feb 3, 2026
parsapy1391-lang commentedon Feb 3, 2026
github-actions commentedon Oct 14, 2026
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.