New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiling with wrong NODE_MODULE_VERSION ? #3660
Comments
ok it works fine with electron 4.0.0. , is it a issue with sqlite3, electron or electron-builder |
Same issue here with |
This is being caused by electron/electron#16687 in electron 4.0.4. |
@alexmoon thanks for your reply. Electron is using the wrong version number for Node.js and that's why the native modules are not working any more? I also do not understand how to fix the problem? |
@phhoef not sure what your issue is but 4.0.4 changes the NODE_MODULE_VERSION to 69 so any previous version works for me |
I deleted the |
@phhoef because you are still on 4.0.4 since NODE_MODULE_VERSION was changed to 69 in 4.0.4 |
Thanks for your reply. I would have expected, that this changes the version of Electron to 4.0.3, right? |
not sure but for me i updated from 4.0.0 to 4.0.4 and i got this issue and the person said it was changed in 4.0.4 so i just reinstalled 4.0.0 and its working like before |
Hmm, seems that it does not work for me. |
10.11.0 |
I noticed, that the
Is the |
I explicitly set the Thanks for your help |
I am using sqlite3 and in my package.json my postinstall included
So after But when I try to build the application using
So I think the issue doesn't lie with electron or the module (because works file when rebuilt using electron-rebuild) but with the electron-builder package. Can anyone else confirm this and post a solution? Is it a bug? |
yea like i said mine builds fine with rebuilder and i don't how to fix it when i use builder |
I was thinking of building it with electron-rebuild and instead of using electron-builder how about electron-packager? So let's try to build with electron-rebuild and package it with electron-packager. If it works fine we can definitely say the issue is with this package. I'll try to do this maybe today or tomorrow. If you are free can you try this and revert here? It would really help :) |
I have checked building the app with following versions and the build is successful
So you can keep everything at its latest version just keep electron at 4.0.3 and your app should build fine! |
Have the same issue after packaging with sqlite3. (stayed on 4.0.3 and all works fine. Hope a solution is found for 4.0.4 soon) |
Thank you @thevirajshelke! |
Trying to add sqlite, but having issues with NODE_MODULE_VERSION Issue found: electron-userland/electron-builder#3660
Trying to add sqlite, but having issues with NODE_MODULE_VERSION Issue found: electron-userland/electron-builder#3660
Trying to add sqlite, but having issues with NODE_MODULE_VERSION Issue found: electron-userland/electron-builder#3660
I've tried to follow all of this thread and I couldn't make it work yet. "dependencies": {
"sqlite3": "^4.0.6"
},
"devDependencies": {
"electron": "^4.0.3",
"electron-builder": "^20.38.5",
"electron-rebuild": "^1.8.4"
} I'm using electron-builder
But still I get the same error, I guess I'm missing something Thanks! |
Trying to add sqlite, but having issues with NODE_MODULE_VERSION Issue found: electron-userland/electron-builder#3660
@ferranDelgado I guess, the way you specified the See my last post. Have a look here for the version syntax: https://docs.npmjs.com/files/package.json |
@phhoef you are totally right, thanks! |
Yes but that's not a solution. I didn't understand the reasoning about switching to non existant node version, specific for electron and its ABI stuff that i don't understand. When I set npmRebuild to false and perform the sqlite rebuild with electron-rebuild - everything is fine. So the issue must be in that npm rebuild command that electron-builder perform, which breaks sqlite module build. |
So according to Electron maintainers - electron-builder should do something in order to fix the issue with building the native deps. |
This also works fine for me! So you can keep everything updated & just in the The issue is with electron-builder, when it tries to rebuild packages while building app it fails! I am sure devs will fix this asap till then these are the workarounds :) |
@thevirajshelke This is exactly what I have done as workaround. |
hi , in my case I add this |
I had the same issue, and the only way to fix it was to go back from electron 4.0.5 to electron 4.0.3. The problem was always with "sqlite3": "4.0.6", and so far I know, sqlite3 can't be compiled with the node version that is bundled with those electron versions. However I did a windows.process.versions in both 4.0.3 and 4.0.5 and it states that |
FWIW, this is fixed for me in Electron v4.1.0 with node-abi v2.7.1 installed. The release notes from Electron say:
|
For any other Macs, I had this same issue with a natively compiled module ( |
i have same issue but |
I'm having the same problem with Electron 5.0.x and node-abi 2.8. Everything seems to be building using 47, rather than 70 (which looks suspiciously like the node 5 ABI version...). These were compiled with |
For reference, I tried flushing my node-gyp cache and node-modules and still had a problem. I did notice with DEBUG=* that it never seems to compile This is interesting:
|
It is not electron-builder problem.
If native module doesn't use any prebuild — then no problem regardless of ABI/electron version. Module will be recompiled on your machine. If native module uses So, electron-builder cannot handle such errors — we rely on existing tools and I don't want to reinvent I hope that now situation and reasons are clear for everyone. So, if Electron violates semver policy once again and for now no workaround on
(you can also pass as CLI arg: |
@develar this just worked perfectly. Although this config is being respected only when building. How come |
"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 rebuildor
npm 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
The text was updated successfully, but these errors were encountered: