npm install electron项目报错RequestError: socket hang up
electron的安装并不依赖本地npm中registry所配置的镜像,需要增加名称为electron_mirror的镜像源,根目录新建.npmrc文件,添加electron_mirror=https://npm.taobao.org/mirrors/electron/即可。
修改后的文件内容如下:
registry=https://mirrors.huaweicloud.com/repository/npm/
electron_mirror=https://npm.taobao.org/mirrors/electron/