Skip to content

Commit 1c62e80

Browse files
defunctzombiebnoordhuis
authored andcommitted
doc: add note about NODE_MODULE module_name requirement
module_name needs to match the final binary name
1 parent eba1f7b commit 1c62e80

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

doc/api/addons.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ Note that all Node addons must export an initialization function:
5151

5252
There is no semi-colon after `NODE_MODULE` as it's not a function (see `node.h`).
5353

54+
The `module_name` needs to match the filename of the final binary (minus the
55+
.node suffix).
56+
5457
The source code needs to be built into `hello.node`, the binary Addon. To
5558
do this we create a file called `wscript` which is python code and looks
5659
like this:

0 commit comments

Comments
 (0)