vue-devtools安装失败Electron failed to install correctly解决
- 启动报错
C:\Users\Administrator>vue-devtools
C:\Users\Administrator\AppData\Roaming\npm\node_modules@vue\devtools\node_modules\electron\index.js:14
throw new Error(‘Electron failed to install correctly, please delete node_modules/electron and try installing again’)
^
Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (C:\Users\Administrator\AppData\Roaming\npm\node_modules\[4m@vue[24m\devtools\node_modules\[4melectron[24m\index.js:14:11)
at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\[4m@vue[24m\devtools\node_modules\[4melectron[24m\index.js:18:18)
[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)[39m
[90m at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)[39m
[90m at Module.load (internal/modules/cjs/loader.js:928:32)[39m
[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)[39m
[90m at Module.require (internal/modules/cjs/loader.js:952:19)[39m
[90m at require (internal/modules/cjs/helpers.js:88:18)[39m
at Object. (C:\Users\Administrator\AppData\Roaming\npm\node_modules\[4m@vue[24m\devtools\bin.js:2:18)
[90m at Module._compile (internal/modules/cjs/loader.js:1063:30)[39m
- 原因
electron安装失败 - 解决
- 删除node_modules/electron
- 设置环境变量ELECTRON_MIRROR=https://npm.taobao.org/mirrors/electron/
- 重新安装electron
npm install -g electron