Error when using latest LTS node.js (V12.13.0)
See original GitHub issueAble to install node-rdkafka V 2.7.4 on a linux system having node.js V12.13.0. But getting the below error When below code is executed
const kafka = require('node-rdkafka');
console.log(kafka.features);
Error: The module '/opt/mount2/poc/node_modules/node-rdkafka/build/Release/node-librdkafka.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1003:18)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at bindings (/opt/mount2/poc/node_modules/node-rdkafka/node_modules/bindings/bindings.js:112:48)
at Object.<anonymous> (/opt/mount2/poc/node_modules/node-rdkafka/librdkafka.js:10:32)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
Running commands npm rebuild
or npm install
is not solving the issue
Please help to resolve this
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
npm does not support Node.js v12.18.3 - Stack Overflow
I found the work-around ! First you need to open your cmd line, and use " npm install -g npm@latest " you'll get...
Read more >Node v12.13.0 (LTS)
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Read more >How to fix 'npm does not support Node.js v14' error on ...
Uninstall node.js (Windows Add/Remove programs) · Manually delete the npm folder from your user profile (%APPDATA%/roaming/npm) · Install node.js ...
Read more >Download & Update Node.js to the Latest Version! Node v19 ...
Direct download links to update to the latest Node.js versions: Node v19.0.0 / LTS v16.18.0.
Read more >How to Easily Update Node.js to the Latest Version
So, updating to the latest Node.js version can help you to make the ... You can decide to work with the Long-term Supported...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
rm -rf node_modules; npm install
Thanks!