查询文档得知
https://www.electronjs.org/docs/latest/tutorial/installation
打开项目 git bash here 输入vi ~/.npmrc 设置如下
registry=https://registry.npm.taobao.org
electron_mirror=https://cdn.npm.taobao.org/dist/electron/
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
phantomjs_cdnurl=http://npm.taobao.org/mirrors/phantomjs
其他问题 参考 https://blog.csdn.net/qq_43548590/article/details/120021371