electron 阿里镜像
npm config set ELECTRON_MIRROR https://registry.npmmirror.com/-/binary/electron/
nvm 使用阿里镜像
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node/
n 使用阿里镜像
export N_NODE_MIRROR=https://npmmirror.com/mirrors/node/
npm使用阿里源
npm i [package-name] --registry=https://registry.npmmirror.com
npm config set registry https://registry.npmmirror.com
yarn config set registry https://registry.npmmirror.com
yarn config delete registry
# 设置阿里镜像源(加速)
npm config set registry=https://registry.npmmirror.com
npm config set disturl=https://registry.npmmirror.com/-/binary/node
#如果下载electron慢,配置如下npm config set electron_mirror=https://registry.npmmirror.com/-/binary/electron/
参考自: