vue electron 下载Vue-devtools ChromeExtension扩展失败

 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_DEVTOOLS),不让下载Chrome浏览器扩展,但在这里我们要下载此浏览器扩展,操作如下:

查看源码:node_modules/electron-devtools-installer/dist/downloadChromeEx

你可能感兴趣的:(技术开发经验笔记,electron,前端,javascript)