我在使用电子的桌面应用程序运行良好,除了autoUpdater.setFeedURL()方法外,它总是返回以下异常:“更新检查失败。服务器发送无效响应。稍后再试。”
if(!isDev)
{
autoUpdater.setFeedURL({
"url":"https://github.com/MyUsername/MyRepos/releases/"
});
autoUpdater.checkForUpdates();
}
发布于 2020-10-30 09:01:05
嗯!头痛两天后,我发现我只是在使用一个不推荐的autoUpdater版本,我应该使用以下内容:
const { autoUpdater } = require('electron-updater');
所以我接下来要做的就是删除autoUpdater.checkForUpdates() setFeedURL行,而不是使用autoUpdater.checkForUpdatesAndNotify()
if(!isDev)
{
autoUpdater.checkForUpdatesAndNotify();
}
https://stackoverflow.com/questions/64571696
复制相似问题