Closed gitliyu closed 6 years ago
electron 1.8.2
Please use Electron 3.x (it is stable release).
@develar Thanks a lot, the problem has been solved
@develar I'm still getting the error using the below versions on Mac (haven't tested Windows). It worked fine with "electron-updater": "^3.1.2" and "electron": "~1.7.11"
yarn list --pattern electron
yarn list v1.9.4
warning Resolution field "asn1.js@4.10.1" is incompatible with requested version "asn1.js@^5.0.0"
├─ electron-builder-lib@20.19.2
├─ electron-builder@20.19.2
├─ electron-context-menu@0.9.1
├─ electron-debug@1.5.0
│ └─ electron-is-dev@0.3.0
├─ electron-dl@1.12.0
├─ electron-download@4.1.1
├─ electron-in-page-search@1.3.2
├─ electron-is-accelerator@0.1.2
├─ electron-is-dev@0.1.2
├─ electron-json-storage@3.2.0
├─ electron-localshortcut@3.1.0
├─ electron-osx-sign@0.4.10
├─ electron-publish@20.19.0
├─ electron-toolkit@1.0.24
├─ electron-unhandled@1.1.0
├─ electron-updater@4.0.5
├─ electron@3.0.10
├─ keyboardevent-from-electron-accelerator@1.1.0
└─ winston-electron@0.2.0
Unhandled Promise Rejection
TypeError: this.app.whenReady is not a function
at ElectronAppAdapter.whenReady (/Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/ElectronAppAdapter.ts:9:21)
at /Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/AppUpdater.ts:337:20
at Generator.next (<anonymous>)
From previous event:
at MacUpdater.getUpdateInfoAndProvider (/Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/AppUpdater.ts:336:43)
at /Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/AppUpdater.ts:363:31
at Generator.next (<anonymous>)
From previous event:
at MacUpdater.doCheckForUpdates (/Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/AppUpdater.ts:360:34)
at MacUpdater.checkForUpdates (/Users/mritchie712/seekwell/desktop/node_modules/electron-updater/src/AppUpdater.ts:220:35)
at App.createWindow (/Users/mritchie712/seekwell/desktop/main.js:1335:15)
That is strange, what do you get when you run node_modules/electron/dist/Electron.app/Contents/MacOS/Electron -v
?
Other than that I suggest you delete your node_modules
directory and run yarn
again.
Thanks for following up, I realized the problem was with how I was calling checkForUpdates
, I needed to do this:
app.on('ready', function() {
createWindow()
backgroundWindow = createBackgroundWindow()
if (targetEnv == 'prod') {
autoUpdater.checkForUpdates();
}
});
instead of:
app.on('ready', createWindow)
Where I had autoUpdater.checkForUpdates();
as part of createWindow()
@develar Thanks a lot, the problem has been solved
please tell your methods,thanks
electron 1.8.2 vue-electron 1.0.6 electron-updater 4.0.4
Hi, I'm using the latest version of electron-updater, when I call the method
autoUpdater.checkForUpdates
, get the following errorThis is part of my
main.js