0

I'm trying to build an electron app with sqlite3 .Now I'm trying to use electron builder for sqlite3 but I'm getting errors even after adding postinstall dependencies :

My package.json :

{
  "name": "store_electron",
  "version": "1.0.0",
  "description": "trying ",
  "main": "main.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "install-app-deps"
  },
  "author": "armelzong@gmail.com",
  "license": "ISC",
  "dependencies": {
    "sqlite3": "^4.2.0"
  },
  "devDependencies": {
    "electron-builder": "^22.7.0",
    "electron-rebuild": "^1.11.0"
  }
}

The error I'm getting after tryied : npm run postinstall

> install-app-deps

  • please use as subcommand: electron-builder install-app-deps
  • electron-builder  version=22.7.0
Error: Cannot compute electron version from installed node modules - none of the possible electron modules are installed.
See https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246
    at computeElectronVersion (C:\Users\boureima\Desktop\store_electron\node_modules\app-builder-lib\src\electron\electronVersion.ts:100:11)
    at getElectronVersion (C:\Users\boureima\Desktop\store_electron\node_modules\app-builder-lib\src\electron\electronVersion.ts:23:10)
    at async Promise.all (index 1)
    at installAppDeps (C:\Users\boureima\Desktop\store_electron\node_modules\electron-builder\src\cli\install-app-deps.ts:52:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! store_electron@1.0.0 postinstall: `install-app-deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the store_electron@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\boureima\AppData\Roaming\npm-cache\_logs\2020-06-04T10_37_40_435Z-debug.log

When using "postinstall": "electron-builder install-app-deps": I'm getting this :

 ⨯ Cannot compute electron version from installed node modules - none of the possible electron modules are installed.
See https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! store_electron@1.0.0 postinstall: ` electron-builder install-app-deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the store_electron@1.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\boureima\AppData\Roaming\npm-cache\_logs\2020-06-04T11_42_02_139Z-debug.log
Esdras Zongo
  • 293
  • 2
  • 12
  • Does this answer your question? [How to use sqlite3 module with electron?](https://stackoverflow.com/questions/32504307/how-to-use-sqlite3-module-with-electron) – Mehdi Dehghani Jan 26 '21 at 15:00

0 Answers0