Closed agnoam closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Same issue
+1
For posterity: 1) electron-updater needs to be called from the main thread. Not the renderer. Put the code in main.ts . Expose it through whatever IPC method you want to use. 2) modules used in the main thread need to be installed in ./app/packages.json not ./packages.json . Yes, that file with no other dependencies inside.
I'm trying to use
electron-updater
package, by its documentation. I write this angular service: import { Injectable } from '@angular/core'; import { autoUpdater } from 'electron-updater';But when I run
checkForUpdates()
it's throwing me this exception:Possible solution:
More thing, I have tried to fix this problem myself, and I found if you change ElectronAppAdapter constructor from:
constructor(app = require("electron").app)
, to this:constructor(app = require("electron").remote.app)
. everything fixes.