Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to pass flags to Node instance #100

Open
crutchcorn opened this issue Jun 7, 2024 · 3 comments
Open

Add ability to pass flags to Node instance #100

crutchcorn opened this issue Jun 7, 2024 · 3 comments

Comments

@crutchcorn
Copy link

I am trying to write a program that accesses the internal package from Node.js. To do this in most apps I would typically pass:

--expose-internals

To handle this edgecase.

However, it seems that doing this after-the-executable generation does not appear to do anything.

.\its-node.exe --expose-internals
node:internal/util/embedding:48
    throw new ERR_UNKNOWN_BUILTIN_MODULE(id);
    ^

Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: internal/fs/utils
    at embedderRequire (node:internal/util/embedding:48:11)
    at ./out/bundle.js:3197:5
    at embedderRunCjs (node:internal/util/embedding:37:10) {
  code: 'ERR_UNKNOWN_BUILTIN_MODULE'
}

Node.js v22.2.0

Moreover, it would be nice if my users didn't have to pass a flag of any kind, as the option was enabled from the executable to begin with.

Thanks for your efforts on this and taking the time to read through the request 😊

@jasonolmstead33
Copy link

In the past, ive used NODE_OPTIONS to pass a node option to the SEA.

ex: NODE_OPTIONS="--no-warnings" ./server

Give that a try?

@crutchcorn
Copy link
Author

Right, but I'd love for the NODE_OPTIONS to be embedded into ./server

@jasonolmstead33
Copy link

Right, but I'd love for the NODE_OPTIONS to be embedded into ./server

ah yes, I agree. make it part of the blob when building the SEA or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants