本文共 759 字,大约阅读时间需要 2 分钟。
一、镜像源链接切换
npm config set registry http://registry.npm.taobao.org
npm get registry
npm config set registry http://www.npmjs.org
二、使用 nrm 切换镜像源
npm install -g nrm
npm -------- https://registry.npmjs.org/
yarn ------- https://registry.yarnpkg.com/
cnpm ------- http://r.cnpmjs.org/
taobao ----- https://registry.npm.taobao.org
/ nj ---https://registry.nodejitsu.com/
npmMirror --https://skimdb.npmjs.com/registry/
edunpm -----http://registry.enpmjs.org
/nrm use taobao
注意:在Linux系统环境里面如果下载nrm后执行nrm ls命令出现未找到命令,需要配置全局的软链接:
sudo ln -s /home/nodejs/bin/nrm /usr/local/bin/
其中 /home/nodejs/bin/nrm
是指你本地安装nodejs包的路径。/usr/local/bin/
路径是你的程序命令执行路径,相当与Windows系统下的环境变量 PATH 路径,配置后可以在系统的任意位置执行你的命令。
转载地址:http://uqfrj.baihongyu.com/