microsoft / napajs

Napa.js: a multi-threaded JavaScript runtime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Napajs does not work on node 8.8.1+

eakarpov opened this issue · comments

Napajs does not work with Nodejs of 8.8.1+ version.

  • on Windows it shows error: "Error: Invalid access to memory location."
  • on Linux error looks like: "Error: The module '.../napajs/bin/napa-binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 54. Please try re-compiling or re-installing the module.

I tried to rebuild napajs with "npm rebuild napajs --force" but it has no effect.

It looks like the problem is caused by node API version mismatch.

I didn't find any release version using NODE_MODULE_VERSION 54 in Node.js release table. Are you using a private build of Node?

I use an installed via pacman official repository Node build. I agree it is very strange to see a 54 module version...

@eakarpov did you resolve this issue?

Recently I realize that there are some other forms of Node.js distribution which are using different NODE_MODULE_VERSION than the official release. For example, Electron 1.7.10 uses 54 as the module version.

If you want to use Napa.js on other platforms ( nw.js or Electron ), you need to build Napa.js from source instead of using the pre-built binaries.

I am not sure if this is your case, but if so I hope the following links may be helpful:

https://github.com/cmake-js/cmake-js#electron
https://github.com/Microsoft/napajs/wiki/Build-Napa.js-for-Electron

@fs-eire No, I have not.
But yes, you are right, I have tried to use it on Electron. Thanks for links, I will consider them.