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.

The module was compiled against a different Node.js version using NODE_MODULE_VERSION 51. This version of Node.js requires NODE_MODULE_VERSION 53.

See original GitHub issue
  • Version: 19.13.0
  • Target: darwin x64

develar at the Slack Channel told me to report this - as it seems to be a bug:

im trying to get my Electron Ionic App packaged - so i followed the Quickstart and got the following Error: The module was compiled against a different Node.js version using NODE_MODULE_VERSION 51. This version of Node.js requires NODE_MODULE_VERSION 53. (...).

after consulting your Slack Channel develar suggested to try it with env DEBUG=electron-builder*

and trying: "buildDependenciesFromSource": true, in m build property of package.json

with "buildDependenciesFromSource": true i saw it rebuilding serialport and it worked.

develar told me that this is still wrong behaviour and i should not need "buildDependenciesFromSource": true
as he described to me:

this options makes sense only for prebuild and prebuild must fallback to build from sources if no suitable version. in your case no fallback and it leads to runtime error. prebuild installs incorrect version instead of correct/rebuilding. Why — not clear yet.

package.json with "buildDependenciesFromSource": true Log of Successfull packaging with "buildDependenciesFromSource": true Logs of Unsuccessfull build

i seem to be able to reproduce it when i delete my node_modules, then i use buildDependenciesFromSourceonce and do not delete my node_modules it keeps working (which makes sense to me)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

5reactions
timfishcommented, Nov 2, 2017

On changing electron version you should always remove node-modules and install all dependencies again. On Windows I sometimes have to clear out the node-gyp cache/temp directory before everything will build again.

5reactions
timfishcommented, Jul 11, 2017

You shouldn’t usually need to use buildDependenciesFromSource.

If you just want to build any native modules which are npm dependencies, just add the following to your npm scripts:

    "postinstall": "electron-builder install-app-deps",
Read more comments on GitHub >

github_iconTop Results From Across the Web

was compiled against a different Node.js version using ...
Be sure you only have one version of NodeJS installed. ... 51 means that your node version is nodejs v7.x, requires NODE_MODULE_VERSION 57 ......
Read more >
The module was compiled against a different Node.js version
Issue If this is an issue with installation, I have read the troubleshooting guide. ⚠ Error: The module ...
Read more >
How can I find my current NODE_MODULE_VERSION? - utf9k
node ' was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 89.
Read more >
The Module was compiled against a different Nodejs version ...
I am trying to use the Edge-Impulse CLI, and I have installed it with npm install -g edge-impulse-cli --force However, this is the...
Read more >
Previous Releases - Node.js
Version Date V8 npm NODE_MODULE_VERSION Node.js 19.3.0 2022‑12‑14 10.8.168.21 9.2.0 111 Downloads C... Node.js 19.2.0 2022‑11‑29 10.8.168.20 8.19.3 111 Downloads C... Node.js 19.1.0 2022‑11‑14 10.7.193.20 8.19.3...
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