首页 >后端开发 >php教程 >javascript - 如何清除已设置的npm淘宝镜像?

javascript - 如何清除已设置的npm淘宝镜像?

WBOY
WBOY原创
2016-06-06 20:15:311736浏览

开发React Native时,通过下面命令将npm设置成淘宝镜像
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist

现在需要将淘宝镜像去掉,还原成官方镜像,请问如何处理?

回复内容:

开发React Native时,通过下面命令将npm设置成淘宝镜像
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist

现在需要将淘宝镜像去掉,还原成官方镜像,请问如何处理?

<code>npm config delete registry
npm config delete disturl

或者 
npm config edit 
找到淘宝那两行,删除</code>

手动的太麻烦了,一般用 https://www.npmjs.com/package/nrm 做切换

<code>$ nrm ls
 
* npm ---- https://registry.npmjs.org/
  cnpm --- http://r.cnpmjs.org/
  taobao - http://registry.npm.taobao.org/
  eu ----- http://registry.npmjs.eu/
  au ----- http://registry.npmjs.org.au/
  sl ----- http://npm.strongloop.com/
  nj ----- https://registry.nodejitsu.com/
  pt ----- http://registry.npmjs.pt/</code>
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn