Skip to content

TypeError: Missing internal module 'node:crypto' #53163

Open
@bncdemo

Description

@bncdemo

Version

v18.20.2

Platform

win10

Subsystem

No response

What steps will reproduce the bug?

I am building node with a vcbuild.bat release x64 static dll command.
node.exe <myapp.js> run as expected, but when I try to do this with the built libnode.dll, I receive:

TypeError: Missing internal module 'node:crypto'

I don't understand. In shared lib mode the internal modules not loaded automatically? (I can run 'regular' scripts with the shared lib without problem)

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

It happens every time.

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

No response

What do you see instead?

The code drops an unhandled exception and stop:

process.on('uncaughtException', function(err) {
  console.log(err);
});

->

TypeError: Missing internal module 'node:crypto'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.embeddingIssues and PRs related to embedding Node.js in another project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions