-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
Electron.js rebuild error with better-sqlite3 #1163
Comments
Compilation for Electron v29 requires the changes from #1151. So you may either install better-sqlite3 manually from the related branch or downgrade to Electron v28 in order to make use of the prebuilt binary. |
What you linked worked! Thanks. Error: The module '/home/dez/vsc/VideoDeck-V2/node_modules/better-sqlite3/build/Release/better_sqlite3.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 121. This version of Node.js requires
NODE_MODULE_VERSION 108. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`). Any clue about how to fix this? Thanks. |
That means that, while you now have a version of better-sqlite3 compiled for Electron v29 (module version 121), the actual runtime loading the native module is Node 18 (module version 108). My best guess would be, that your start script is not calling Electron for execution. |
After upgrade to 9.4.4 and electron 29.1.6, I get this error when running ⠋ Building module: better-sqlite3, Completed: 0Traceback (most recent call last): ✖ Rebuild Failed |
This is not an issue of better-sqlite3 but a known one with node-gyp in combination with Python, which both are required to get the native module compiled. While the prebuilt binaries are not yet available, you might have a look here #1154 (comment). |
Thank you @neoxpert for the information, it fixed my issue. |
This is fixed in https://github.com/WiseLibs/better-sqlite3/releases/tag/v9.4.5 |
I was trying to install a npm package Quick.db which uses better-sqlite3 to use in my electron project but when I go to rebuild with "electron-rebuild" it throws this huge error, I haven't been able to find much online as to why this even happens.
Error:
OS: Ubuntu 20.04
NodeJS: v18.18.2
better-sqlite3: ^9.4.3
electron: ^29.1.5
electron-rebuild: ^3.2.9
The text was updated successfully, but these errors were encountered: