electron / update.electronjs.org

📡 A free service that makes it easy for open-source Electron apps to update themselves.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[ERROR] function validateInput - no such file or directory, open 'dist\main\package.json'

Maus3rSR opened this issue · comments

Hello there,

First time using this plugin, I have an issue with it.

When I try to run yarn dev I have an exception telling that package.json does not exist in the root/dist/main folder (and thats normal because package.json is not copied in compilation).

The line from your update-electron-app\index.js (l. 110) is:
const pkgBuf = fs.readFileSync(path.join(electron.app.getAppPath(), 'package.json'))

 Electron -------------------

  Error: ENOENT: no such file or directory, open 'E:\Developpement\Web\Projects\Hajime\dist\main\package.json'
      at Object.openSync (fs.js:453:3)
      at Object.func [as openSync] (electron/js2c/asar.js:155:31)
      at Object.readFileSync (fs.js:353:35)
      at Object.fs.readFileSync (electron/js2c/asar.js:597:40)
      at validateInput (E:\Developpement\Web\Projects\Hajime\node_modules\update-electron-app\index.js:110:23)
      at updater (E:\Developpement\Web\Projects\Hajime\node_modules\update-electron-app\index.js:22:10)
      at Module.eval (webpack-internal:///./src/main/index.js:35:59)
      at eval (webpack-internal:///./src/main/index.js:122:30)
      at Module../src/main/index.js (E:\Developpement\Web\Projects\Hajime\dist\main\main.js:952:1)
      at __webpack_require__ (E:\Developpement\Web\Projects\Hajime\dist\main\main.js:704:30)

 ----------------------------

I am using electron 5.0.6, I could'nt up higher beaucause I use SQLite and install-app-deps does not work with latest version for SQLite deps (if the bug comes from because im using a uncompatible version of Electron, I'll see how I can fix it in another way).

How I can do without setting manually feed url ?

Best regards