mscdex / node-xxhash

An xxhash binding for node.js
Other
193 stars 28 forks source link

xxhash needs specific node version #21

Closed vasyl-shumskyi closed 6 years ago

vasyl-shumskyi commented 6 years ago

Hello,

I'm getting the following error while trying to use xxhash 0.2.4 as well as 0.2.3

Uncaught Error: The module '/opt/bin/node_modules/xxhash/build/Release/hash.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 (for instance, using `npm rebuild` or`npm install`).
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:598:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/bin/node_modules/xxhash/lib/xxhash.js:4:13)
    at Object.<anonymous> (/opt/bin/node_modules/xxhash/lib/xxhash.js:51:3)

Right now I'm using node 7.x / NODE_MODULE_VERSION 54 and can't upgrade it to node 8.x / NODE_MODULE_VERSION 57 because of dependencies.

Kindly help

mscdex commented 6 years ago

You're better off asking on an Electron-related issue tracker. You probably have to install/compile xxhash using the build environment included with whatever version of Electron you're using instead of your plain/system copy of node/npm.

vasyl-shumskyi commented 6 years ago

Thanks for the quick answer @mscdex .

The latest stable Electron 1.7.10 built with Node: 7.9.0 https://electronjs.org/

Also, I've tried few latest betas of Electron built with node 8.x, but they are unstable, so application didn't run correctly.

So this seems to be deadlock :)

mscdex commented 6 years ago

As I said, you will have to follow the instructions on how to compile addons for your particular version of Electron. If you still have problems, you should create an issue on the appropriate Electron repository issue tracker.