tmotagam / sqlite-electron

module for electron to use sqlite3 databases
GNU General Public License v3.0
80 stars 12 forks source link

Stuck at setdbPath when running compiled program #33

Open JustArtiom opened 2 weeks ago

JustArtiom commented 2 weeks ago

Hello I came across this package and decided to implement it in my project.

Sqlite-electron: 3.1.1 Electron: 33.0.2 Electron-forge: 7.5.0 A typescript electron project with webpack vite react frontend

Everything was fine until I started testing my electron project by compiling and running the binary executable file.

The first error I came across is:

 Error: ENOENT, .webpack\sqlite-win32-x64\sqlite-win32-x64.exe not found in C:\Code\UpApp-old\out\upapp-win32-x64\resources\app.asar

But I managed to fix it by adding a render webpack rule to copy the folder with sql binary files from node_modules/sqlite-electron/sqlite-win32-x64 to .webpack/sqlite-win32-x64 and that seemed to solve the problem but I don't think it's the most efficient way.

However I came across now to this issue where the setdbPath function is awaited but it nevere returns or throws an error nor it creates a database file. I have tested with creating a txt file to check if maybe I don't have permission but it successfully created the file which means I do have permission

tmotagam commented 3 days ago

Hi @JustArtiom, Can you package it without asar option and try again.