Search code examples
node.jssqliteelectronknex.jselectron-packager

Electron build for windows shows sqlite3 error. But same build for Ubuntu Works


enter image description here

Packed using: Electron-Packager

Database: sqlite

The app uses Knex as a driver to query to mysqlite.

The module which it says that it cannot find is already present! But then too the error shows up.

I tried to navigate to the resource/app and then use commands like

npm run rebuild

tried installing python, node and then tried but seems like it required some CL.exe file so had to dowload Visual Studio C++ packages too but unfortunately it didn't have that file in my case.

Also tried

npm install sqlite3 --build-from-source but got error

Can anyone help me with the exact steps to take? I also need help in knowing do i have to take this steps on the package that is already build or before i build it?


Solution

  • The best possible fix i got is the build the system in windows and then deploy it for windows. You need to google at every step where it breaks and then fix it. There are many possibilities and hence i cannot describe it here.