Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

electron-rebuild building wrong version of node-sqlite3

I am trying to get an Electron app up and running on a Windows 10 dev machine. I run npm install and it installs all the dependencies including sqlite3, electron-prebuilt and electron-rebuild.

I then run electron-rebuild -w sqlite3 -p to create the node-sqlite3 bindings and this successfully creates electron-v1.4-win32-x64 bindings.

However when I run the electron app, it throws an error as it is expecting electron-v1.2-win32-x64. How do I force a build of 1.2, rather than 1.4 of the bindings? Alternatively, how do I get my electron app to use v1.4?

like image 884
Jonathan Smith Avatar asked Dec 03 '25 16:12

Jonathan Smith


1 Answers

Take a look here, or by running electron-rebuild --help.

I believe you can supply the version of electron for which you want to rebuild by supplying the --version flag.

So for you:

electron-rebuild -w sqlite3 -p --version 1.2

Or

electron-rebuild -w sqlite3 -p -v 1.2

As for getting your electron app to use v1.4, I think it's just a matter of installing and using some variant of electron v1.4 to launch your application. Is your version of electron-prebuilt installing electron v1.2?

like image 101
dvlsg Avatar answered Dec 06 '25 11:12

dvlsg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!