npm镜像源管理及管理工具,nrm管理及使用registry镜像地址
nrm(npm registry manager)
nrm(npm registry manager)是npm的镜像源管理工具,有时候国外资源太慢,使用这个就可以快速地在npm源间切换。
安装nrm
npm install -g nrm
查看镜像列表
nrm ls
切换镜像(源间切换)
nrm use tencent
添加镜像(源)
nrm add huaweicloud https://mirrors.huaweicloud.com/repository/npm/
注:huaweicloud,为名称。
删除镜像(源)
nrm del huaweicloud
测试速度
nrm test yarn
nrm test taobao
修改/切换npm的其他镜像地址
直接编辑npm的配置文件
npm config edit
命令更改npm的配置文件
添加registry(镜像源)
npm set registry https://mirrors.huaweicloud.com/repository/npm/
npm config set registry https://mirrors.huaweicloud.com/repository/npm/
删除registry(镜像源)
npm config rm registry
查看registry(镜像源)
npm config get registry