In my electron app I have installed sqlite3 via npm
npm install sqlite3
But once i try to interact with the database it cant find the datab
1: Include rebuild in Package.json file and install npm electron-rebuild
{
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"rebuild": "electron-rebuild -f -w sqlite3"
},
"repository": "https://github.com/electron/electron-quick-start",
"keywords": [
"Electron",
"quick",
"start",
"tutorial",
"demo"
],
"author": "author",
"license": "CC0-1.0",
"devDependencies": {
"@types/file-saver": "0.0.1",
"electron": "1.7",
"electron-rebuild": "^1.6.0"
},
"dependencies": {
"sqlite3": "^3.1.13"
}
}
2: install python 2.7 and add its path to environmental variable e.g C:\Python27;
3: npm INSTALL and then npm run rebuild