question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when using latest LTS node.js (V12.13.0)

See original GitHub issue

Able 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sam-githubcommented, Apr 11, 2020

rm -rf node_modules; npm install

0reactions
wong2commented, Apr 11, 2020

Thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found