I am trying to compile and use a N-API Node JS c++ addon. The code compiles fine but at runtime I get the following error:
module.js:664
return process.dlopen(module, path._makeLong(filename));
^
Error: Module did not self-register.
at Object.Module._extensions..node (module.js:664:18)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/johngorter/Desktop/WASM/index2.js:1:77)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
The strange thing is that when I replace the cc code with 'normal' C++ addon code (without N-API), everything works fine.
I am working with NodeJS 8.9.2.
Does anyone have a clue?
TIA, John.