Closed dmitriybelyy closed 8 years ago
Was installed when/how? This usually means its not built against the current node, try a npm rebuild
. Many people don't realize that npm i
doesn't actually reinstall their dependencies, or rebuild them against the current node.
It builds and tests pass on node 4 and 6
I did the same as @dmitriybelyy using:
internal/modules/cjs/loader.js:807 return process.dlopen(module, path.toNamespacedPath(filename));
Error: The module '/test/node_modules/modern-syslog/build/Release/core.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using npm rebuild
or npm install
).
I have tried everything including npm rebuild, npm install, remove all node_modules and install fresh, and I still get the same error.
I works fine when using node 10.16.3. I am a bit reluctant to downgrade the node version but I will if I have to.
Your addon was built against 12.x, and you are running against 10.x. How exactly that happened, and why you can't simply rm -rf node_modules
I'm not sure, but the module versions in your message are pretty clear about what's happening. Check it our yourself:
~ % nvm run 10.17.0 -p process.versions.modules
Running node v10.17.0 (npm v6.11.3)
64
~ % nvm run 10.16.3 -p process.versions.modules
Running node v10.16.3 (npm v6.9.0)
64
~ % nvm run 12 -p process.versions.modules
Running node v12.13.0 (npm v6.12.0)
72
~ % nvm run 12.0.0 -p process.versions.modules
Running node v12.0.0 (npm v6.9.0)
72
~ % nvm run 13.0.0 -p process.versions.modules
79
Note that this has nothing to do with 10.17.0 vs 10.16.3, neither will work, because your addon was built with 12.x (module version 72). The module version never changes within a major release line.
Ah dang! Now I remember some guy used nvm because using apt install node he got an old version so apparently he used nvm. Somehow using npm install uses Node 8 but when I run the app I'm using node 10. Thanks and sorry to trouble you, I should have guessed it.
On Mon, Nov 4, 2019 at 4:46 AM Sam Roberts notifications@github.com wrote:
Your addon was built against 12.x, and you are running against 10.x. How exactly that happened, and why you can't simply rm -rf node_modules I'm not sure, but the module versions in your message are pretty clear about what's happening. Check it our yourself:
~ % nvm run 10.17.0 -p process.versions.modules Running node v10.17.0 (npm v6.11.3) 64 ~ % nvm run 10.16.3 -p process.versions.modules Running node v10.16.3 (npm v6.9.0) 64 ~ % nvm run 12 -p process.versions.modules Running node v12.13.0 (npm v6.12.0) 72 ~ % nvm run 12.0.0 -p process.versions.modules Running node v12.0.0 (npm v6.9.0) 72 ~ % nvm run 13.0.0 -p process.versions.modules 79
Note that this has nothing to do with 10.17.0 vs 10.16.3, neither will work, because your addon was built with 12.x (module version 72). The module version never changes within a major release line.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/strongloop/modern-syslog/issues/22?email_source=notifications&email_token=AETN5A6IWDUZJQLSJT3AWUDQR42DTA5CNFSM4CUDZHT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC55WXA#issuecomment-549182300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETN5A3JTEA64CSRKGKH7MDQR42DTANCNFSM4CUDZHTQ .
It is not working with on nodejs versions: v4.6.1 v6.9.1
I've got error:
modern-syslog version: 1.1.4 was installed via npm.