1. 源地址
2. 切换方式
方式一:指定源
npm config set registry + 地址
如:npm config set registry https://registry.npmmirror.com
方式二:nrm(推荐使用)
nrm 是一个 npm 源管理器,允许你快速地在 npm 源间切换。
安装nrm
npm install -g nrm
查看源列表
nrm ls
测试源网络
nrm test
切换源
nrm use taobao
3. 使用
例子:
npm install --save-dev electron
评论区