npm run electron:serve,报错信息如下:
Failed to fetch extension, trying 4 more times
Failed to fetch extension, trying 3 more times
Failed to fetch extension, trying 2 more times
Failed to fetch extension, trying 1 more times
Failed to fetch extension, trying 0 more times
Vue Devtools failed to install: Error: net::ERR_CONNECTION_TIMED_OUT
网上大部分的解决方案下:
app.on('ready', async () => {
if (isDevelopment && !process.env.IS_TEST) {
// Install Vue Devtools
try {
// await installExtension(VUEJS3_DEVTOOLS)
} catch (e) {
console.error('Vue Devtools failed to install:', e.toString())
}
}
createWindow()
})
注释掉,await installExtension(VUEJS3_DEV
在尝试使用npm run electron:serve时,遇到了Vue Devtools扩展下载失败的错误,错误提示为net::ERR_CONNECTION_TIMED_OUT。常规解决方案是注释掉安装扩展的代码,但这并不适用。通过分析`electron-devtools-installer`的源码,发现扩展通过fileURL从谷歌下载,由于网络问题无法成功。解决办法是手动下载Chrome扩展ID为ljjemllljcmogpfapbkkighbhhppjdbg的文件,并将其放入指定的filePath。完成这一操作后,Vue Devtools成功安装。
订阅专栏 解锁全文
2887

被折叠的 条评论
为什么被折叠?



