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 buildDependenciesFromSource
once and do not delete my node_modules it keeps working (which makes sense to me)
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
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.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: