Skip to content

Add ability to pass flags to Node instance #100

@crutchcorn

Description

@crutchcorn

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 😊

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions