TryGhost / node-sqlite3

SQLite3 bindings for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How install sqlite3 package manually after electron-packager on linux for windows

tangfengsh opened this issue · comments

Issue Summary

I am trying to package my app with electron-packager. My app have as dependencies sqlite3 and sequelize.

here is my package.json file :

{
"name": "electronjs_base",
"version": "1.0.0",
"description": "Projet de base Electron JS",
"main": "main.js",
"scripts": {
"start": "electron main.js",
"test": "echo "Error: no test specified" && exit 1",
"postinstall": "install-app-deps",
"rebuild": "electron-rebuild -f -w sqlite3"
},
"author": "Aurélien Colombet & Steven Servanton",
"license": "ISC",
"devDependencies": {
"electron": "^4.0.3",
"electron-builder": "^20.38.5",
"electron-packager": "^13.0.1",
"electron-rebuild": "^1.8.2"
},
"dependencies": {
"cors": "^2.8.5",
"ejs": "^2.6.1",
"electron-reload": "^1.4.0",
"express": "^4.16.4",
"formidable": "^1.2.1",
"fs": "0.0.1-security",
"path": "^0.12.7",
"sequelize": "^4.42.0",
"sqlite3": "^4.0.6"
}
}
I am on linux and I am trying to build my app for windows. I use electron:build --windows ,and after build exe, whenrun it on windows with the executable file created by electron-packager I have a javascript error :
QjwUd

It seems build windows exe only have app\node_modules\sqlite3\lib\binding\napi-v6-linux-glibc-x64,not have windows lib

I don't know how to solve that problem, I have trying multiple things like adding sqlite3 in devDependencies instead of dependencies in the package.json but I still have the error.

Thank you for reading me and I hope someone have the solution :).

Have a nice day !

Steps to Reproduce

on linux npm install, ue-cli-service electron:build --windows
after build windows exe can't work

Version

5.1.6

Node.js Version

16.0.0

How did you install the library?

linux install sqlite3