Issue: Module did not self-register for edge_nativeclr.node | code: 'ERR_DLOPEN_FAILED' with Node 18
Error:
Error: Module did not self-register: '\\?\C:\projects\edge-js\lib\native\win32\x64\18.4.0\edge_nativeclr.node'.
at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Module.require (node:internal/modules/cjs/loader:1021:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\projects\edge-js\lib\edge.js:52:8)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12) {
code: 'ERR_DLOPEN_FAILED'
}
Step 4:
Build it with the targeted node version (ex: 18.9.0)
The new edge_nativeclr.node will not have the above issue and works fine with the node 18.9.0
@agracio - Can you please build this above for node 18.9.0? So that, we do not have to create/build separate binaries for this issue.
Thanks in the advance!
Issue: Module did not self-register for edge_nativeclr.node | code: 'ERR_DLOPEN_FAILED' with Node 18
Error:
The same error is happening here for Node 18 in this CI run: https://ci.appveyor.com/project/agracio/edge-js/builds/44772581/job/uyvrmskvw2tac57a
If anyone is facing this error, please find the below resolution.
Resolution: This needed to build your own binaries for your specific node version. In this below case, I tested out with Node 18.9.0
Step 1: Upgrade nan to latest 2.16.0 (https://www.npmjs.com/package/nan) ref: https://github.com/agracio/edge-js/blob/c1cfba1f063cf9c8fb983809eb08d114719cc6dc/package.json#L40
Step 2: Change this
NODE_MODULE
initialization toNAN_MODULE_WORKER_ENABLED
ref: https://github.com/agracio/edge-js/blob/c1cfba1f063cf9c8fb983809eb08d114719cc6dc/src/common/edge.cpp#L84-L86-->
or
Step 3: Change this to your targeted node version. In my case, it's
18.9.0
https://github.com/agracio/edge-js/blob/c1cfba1f063cf9c8fb983809eb08d114719cc6dc/lib/edge.js#L9Step 4: Build it with the targeted node version (ex: 18.9.0)
The new
edge_nativeclr.node
will not have the above issue and works fine with the node 18.9.0@agracio - Can you please build this above for node 18.9.0? So that, we do not have to create/build separate binaries for this issue. Thanks in the advance!