1

I am Stuck in a problem, actually the problem is "my project works fine in production build while i do 'electron .' but when i publish the app with electron-packager and try to run it, it say 'Cannot Find Module node_sqlite3.node',

I tried installing sqlite3 using npm install --save sqlite3 --build-from source but no luck

Here is my Dev Env node -v 10.15.3 npm -v 6.4.1 electron 4.1.3 sqlite3 4.0.6

I say again it works on electron . but doesn't work when I publish the app with electron-packager

i execute the following command for publishing

"publish": "electron-packager . Order-MGT --platform=win32 --arch=ia32  --prune=true --out=dist --ignore=.gitignore --ignore=README.md"

package.json

{ "name": "sample17", "version": "2.1.0", "description": " Inventory Management System", "main": "main.js", "scripts": { "start": "electron .", "rebuild": "electron-rebuild -f -w sqlite3", "publish": "electron-packager . Order-MGT --platform=win32 --arch=ia32 -- prune=true --out=dist --ignore=.gitignore --ignore=README.md --version- string.CompanyName=SaqiXPRO --version-string.FileDescription=SaqiXPRO" }, "dependencies": { "ejs-electron": "^2.0.3", "node-gyp": "^3.8.0", "nodemailer": "^5.1.1", "sqlite3": "^4.0.6" }, "author": "SaqiXPRO", "license": "MIT", "devDependencies": { "electron": "^4.1.3", "electron-packager": "^13.1.1", "electron-rebuild": "^1.8.4" } }

I want to make it working as it does on electron . but i can't quite understand what to do please help

1 Answer 1

0

I had solved the problem by the doing the following

I installed C++ Build Tools 2015 or later and the issue was resolved

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.