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.

compiling with wrong NODE_MODULE_VERSION ?

See original GitHub issue

“electron-builder”: “^20.38.5”,

Windows

I can’t figure this out

node_modules\sqlite3\lib\binding\electron-v4.0-win32-x64\node_sqlite3.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 69. Please try re-compiling or re-installing the module (for instance, using npm rebuildornpm install).

what is NODE_MODULE_VERSION 69 anyways? electron is 4.0.4 everything else build fines just sqlite3 anyone know how what i can do to fix this? i tested it out with electron-rebuild as whats on the electronjs website and that builds it fine and the electron app works but when i try to build with electron-builder i get that error.

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:20
  • Comments:35 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
thevirajshelkecommented, Feb 8, 2019

I have checked building the app with following versions and the build is successful

{
    "dependencies": {
        "sqlite3": "^4.0.6"
     },
    "devDependencies": {
        "electron": "4.0.3",
        "electron-builder": "^20.38.5",
        "electron-rebuild": "^1.8.4",
    }
}

So you can keep everything at its latest version just keep electron at 4.0.3 and your app should build fine! The issue has something to do with specific version of electron i.e. 4.0.4 and electron-builder.

9reactions
thevirajshelkecommented, Feb 20, 2019
"scripts": {
        "start": "electron .",
        "postinstall": "npx electron-rebuild -f -w sqlite3",
        "build-linux-deb": "npx electron-builder --linux deb"
},
"build": {
        "npmRebuild": "false"
},
"dependencies": {
        "sqlite3": "^4.0.6"
},
"devDependencies": {
        "electron": "^4.0.5",
        "electron-builder": "^20.38.5",
        "electron-rebuild": "^1.8.4",
}

This also works fine for me!

So you can keep everything updated & just in the build key inside your package.json add npmRebuild:false, make sure that your postinstall contains rebuild command. This will rebuild all the dependencies immediately after downloading packages and when you build your app using electron-builder it won’t rebuild again because npmRebuild is set to false.

The issue is with electron-builder, when it tries to rebuild packages while building app it fails!
So you can either use this comment of mine or this one 😃

I am sure devs will fix this asap till then these are the workarounds 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-gyp compiling against wrong NODE_MODULE_VERSION
Error: The module '<path_to_module>' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js ...
Read more >
node-gyp builds on wrong nodejs version · Issue #2453 - GitHub
I have problems with building my own module on nodejs versions that differ from the system version. Node Version: v12.22.2 or v16.4.1 ...
Read more >
Rails/Dockerfile: wrong node version - Render community
I have a node version set in my package.json as 18.5.0, this seemingly get installed and used correctly at the beginning of my...
Read more >
Incorrect Node version suddenly required by netlify plugin ...
Hey everyone, I am dealing with strange issue where a plugin netlify-plugin-fetch-feeds breaks the build process completely out of the blue.
Read more >
Dockerfile npm build fails with wrong node_module_version ...
I'm having a strange issue with my project. I'm getting the The module xxx was compiled against a different Node.js version using ...
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