更换源

1
2
3
4
#清空缓存
cache clean -f
#设置华为镜像源
config set registry https://mirrors.huaweicloud.com/repository/

修改浏览器引擎驱动镜像

1
npm config set chromedriver_cdnurl https://mirrors.huaweicloud.com/chromedriver

把electron镜像改成国内镜像

1
npm config set electron_mirror https://mirrors.huaweicloud.com/electron/