tjanczuk / edge

Run .NET and Node.js code in-process on Windows, MacOS, and Linux
http://tjanczuk.github.io/edge
Other
5.42k stars 640 forks source link

Node JS v18 support #728

Closed DanMiMe closed 1 year ago

DanMiMe commented 2 years ago

Hello,

the upgrade for nodejs v16 to v18(multiple versions tested) with(edge-js 18.4.0) causes runtime problems:

server\node_modules\edge-js\samples>node 101_hello_lambda.js node:internal/modules/cjs/loader:1189 return process.dlopen(module, path.toNamespacedPath(filename)); ^

Error: Module did not self-register: '\?\c:\PublicNodeJs\EposWebApp\server\node_modules\edge-js\lib\native\win32\x64\18.4.0\edge_nativeclr.node'. ←[90m at Module._extensions..node (node:internal/modules/cjs/loader:1189:18)←[39m ←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m ←[90m at Module._load (node:internal/modules/cjs/loader:827:12)←[39m ←[90m at Module.require (node:internal/modules/cjs/loader:1005:19)←[39m ←[90m at require (node:internal/modules/cjs/helpers:102:18)←[39m at Object. (c:\PublicNodeJs\EposWebApp\server\node_modules\←[4medge-js←[24m\lib\edge.js:52:8) ←[90m at Module._compile (node:internal/modules/cjs/loader:1105:14)←[39m ←[90m at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)←[39m ←[90m at Module.load (node:internal/modules/cjs/loader:981:32)←[39m ←[90m at Module._load (node:internal/modules/cjs/loader:827:12)←[39m { code: ←[32m'ERR_DLOPEN_FAILED'←[39m }

folofse commented 2 years ago

Hi,

According to similar questions it might be a case of missing dll-files. I tried to figure out which was missing by running a depency-walker , but I'm not sure if that is fully up to date since it suggested files I couldn't find.

In this thread they suggest you to download Microsoft Visual C++ 2015 Redistributable (x64). But that have not solved it for me either. https://github.com/parcel-bundler/parcel/issues/7104

I compiled the node application on Mac and tried to run it on Windows 7 with force-installed Nodej 18.8.0.

Maybe some one else has more luck and can find a working solution?

agracio commented 1 year ago

You can use https://github.com/agracio/edge-js that comes precompiled with new versions of NodeJs.

DanMiMe commented 1 year ago

You can use https://github.com/agracio/edge-js that comes precompiled with new versions of NodeJs.

Thanks, the new Version von edge-js solved my problem.