1.gyp verb which failed Error:not found: python2
$ npm set SKIP_SASS_BINARY_DOWNLOAD_FOR_CI = true
$ npm set SKIP_NODE_SASS_TESTS = true
2.安装electron 速度非常慢
先将安装源切换到淘宝
在npmrc文件中添加内容
路径:C:\Users\[User name]\AppData\Roaming\npm\node_modules\npm\npmrc
内容:
registry=https://registry.npm.taobao.org/
ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/
重新安装 npm i electron
使用yarn
时,修改.yarnrc
:
路径:C:\Users\Administrator\.yarnrc
内容:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
registry "https://registry.npm.taobao.org/"
electron_mirror "https://npm.taobao.org/mirrors/electron/"
electron_builder_binaries_mirror "http://npm.taobao.org/mirrors/electron-builder-binaries/"
lastUpdateCheck 1597030272163
PS:添加镜像地址后,将lastUpdateCheck
行删除保存
3.启动后界面出来但是报错
错误:
Electron-vue ReferenceError: process is not defined
参考这个链接可以解决