Skip to content

How to add an internal module #41064

Answered by aduh95
Melab asked this question in General
Dec 2, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Clone nodejs/node, add a .js file in lib/ folder, and run make -j12 (depends on your OS/platform, see https://github.com/nodejs/node/blob/HEAD/BUILDING.md for further instructions): voilà. You would now have a node executable at out/Release/node with the new built-in module you added.

If you're asking how that module could land on Node.js land, you would need to open a PR on this repo, adding docs, tests, and explanation why you think this module should be part of core. See https://github.com/nodejs/node/blob/HEAD/doc/guides/modules-in-core.md for more info.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@xiBread
Comment options

@Melab
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by avivkeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants