gpt4 book ai didi

javascript - Electron-Builder Updater仅卸载当前安装

转载 作者:行者123 更新时间:2023-12-03 12:28:39 24 4
gpt4 key购买 nike

我正在用Electron制作一个应用程序,并且正在使用带有GitHub Releases的Electron Builder来对我的应用程序进行更新。我正在使用Electron Updater v4.0.6进行更新。
它以前可以运行,但是现在我不知道为什么,但是在安装应用程序之后,它会检查更新,甚至通知我我有更新。我的main.js中有以下代码:

app.on('ready', function()  {
autoUpdater.checkForUpdatesAndNotify();
});

其他部分与GitHub示例完全相同:
https://github.com/iffy/electron-updater-example

该应用程序启动,然后关闭。因此,它应该安装更新,但没有安装。它启动old-uninstaller.exe并卸载当前安装,从而使更新无用。

日志未提供任何信息。他们像往常一样正常:

[2019-01-14 00:35:15.771] [info] App starting...

[2019-01-14 00:35:15.880] [info] Checking for update

[2019-01-14 00:35:15.984] [info] Checking for update...

[2019-01-14 00:35:19.263] [info] Found version 0.0.2-alpha

[2019-01-14 00:35:19.263] [info] Good News! Update is Available. Preparing to Download...

[2019-01-14 00:35:19.264] [info] Downloading update from setup-0.0.2-alpha.exe

[2019-01-14 00:35:19.291] [info] No cached update info available

[2019-01-14 00:35:19.549] [info] Download block maps.

[2019-01-14 00:35:22.299] [info] File has 869 changed blocks

[2019-01-14 00:35:22.303] [info] Full: 58,310.86 KB, To download: 18,792.45 KB (32%)

[2019-01-14 00:36:12.565] [info] Update has finished downloading! Restart to AutoInstall.

[2019-01-14 00:36:18.990] [info] Auto install update on quit

[2019-01-14 00:36:18.992] [info] Install: isSilent: true, isForceRunAfter: false



我似乎无法理解错误所在。任何帮助,将不胜感激!

最佳答案

electron-updater v4.0及更高版本需要Electron 3或更高版本,请检查 Electron 版本,然后尝试将electron-builder更新为最新版本:

4.0.0

BREAKING CHANGES

Requires Electron 3 or later. Cache directory changed, so, full download will be performed on update instead ofdifferential.


引用: https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/CHANGELOG.md#400

关于javascript - Electron-Builder Updater仅卸载当前安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54187622/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com