File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,12 @@ Napi::Object Init(Napi::Env env, Napi::Object exports) {
5858/**
5959* This code defines the entry- point for the Node addon, it tells Node where to go
6060* once the library has been loaded into active memory. The first argument must
61- * match the " target" in our * binding.gyp* . The second argument points to the
62- * function to invoke.
61+ * match the " target" in our * binding.gyp* . Using NODE_GYP_MODULE_NAME ensures
62+ * that the argument will be correct, as long as the module is built with
63+ * node- gyp (which is the usual way of building modules). The second argument
64+ * points to the function to invoke. The function must not be namespaced.
6365*/
64- NODE_API_MODULE(myModule , Init)
66+ NODE_API_MODULE(NODE_GYP_MODULE_NAME , Init)
6567```
6668
6769# # **node-gyp** reference
You can’t perform that action at this time.
0 commit comments