epsilon-sample-app-cpp icon indicating copy to clipboard operation
epsilon-sample-app-cpp copied to clipboard

Nwlink is not compatible with the latest node version

Open yannis300307 opened this issue 1 year ago • 1 comments

The Nwlink node library seems to be to old for the latest Node.js version. It works with Node v20.16.0. It causes the following error when compiling with make or just running nwlink in the terminal :

TypeError: Cannot set property navigator of #<Object> which has only a getter
    at /home/user/.npm/_npx/3f2d5a369feef8ba/node_modules/nwlink/dist/index.js:1:374292
    at /home/v/.npm/_npx/3f2d5a369feef8ba/node_modules/nwlink/dist/index.js:1:374309
    at Object.<anonymous> (/home/user/.npm/_npx/3f2d5a369feef8ba/node_modules/nwlink/dist/index.js:1:374338)
    at Module._compile (node:internal/modules/cjs/loader:1368:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
    at Module.load (node:internal/modules/cjs/loader:1205:32)
    at Module._load (node:internal/modules/cjs/loader:1021:12)
    at Module.require (node:internal/modules/cjs/loader:1230:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/home/user/.npm/_npx/3f2d5a369feef8ba/node_modules/nwlink/bin/nwlink:2:13)
    at Module._compile (node:internal/modules/cjs/loader:1368:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
    at Module.load (node:internal/modules/cjs/loader:1205:32)
    at Module._load (node:internal/modules/cjs/loader:1021:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49

yannis300307 avatar Aug 16 '24 09:08 yannis300307

I suggest updating the readme until this is solved using nvm to install a previous node is straightforward but anyone installing the toolchain for the first time can loose plenty of time until fixing by himself, if it can.

raparici avatar Aug 18 '24 12:08 raparici

@yannis300307 @raparici thanks for this issue! I've encountered the same one, while trying the epsilon-sample-app-c in C rather than C++. You said that

It works with Node v20.16.0.

But npx nwlink fails on my machine, using npx version 8.5.1, and node version 12.22.9. Should I try to switch to Node v20.16.0 ?

Naereen avatar Oct 20 '24 00:10 Naereen

Using nvm (https://github.com/nvm-sh/nvm?tab=readme-ov-file#usage) as you suggested, and the version v20.16.0, this seems to work fine. I've been able to compile the lua app (https://github.com/nwagyu/lua) and the epsilon-sample-app-c app. Thanks!

Naereen avatar Oct 20 '24 00:10 Naereen

This should be fixed with [email protected]

EmilieNumworks avatar Dec 13 '24 10:12 EmilieNumworks

Hi there @EmilieNumworks and thanks for taking the time to look into this issue. I'll try it the most recent version when possible, I will let you know whether it works or not ! Kind regards, and in advance a Merry Chrismas!

Naereen avatar Dec 22 '24 12:12 Naereen