- 启动报错
C:UsersAdministrator>vue-devtools C:UsersAdministratorAppDataRoamingnpmnode_modules@vuedevtoolsnode_moduleselectronindex.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:UsersAdministratorAppDataRoamingnpmnode_modules[4m@vue[24mdevtoolsnode_modules[4melectron[24mindex.js:14:11) at Object. (C:UsersAdministratorAppDataRoamingnpmnode_modules[4m@vue[24mdevtoolsnode_modules[4melectron[24mindex.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:UsersAdministratorAppDataRoamingnpmnode_modules[4m@vue[24mdevtoolsbin.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