解决npm install慢的问题 npm更换淘宝国内源

星期五, 2022-09-30 | Author: Lee | 前端 | 385 views

不推荐使用cnpm,貌似有小毛病.

1.更换成功taobao的数据源

	npm config set registry https://registry.npm.taobao.org

2.永久修改镜像源

$ npm config list
# 其他查看配置的方式
$ npm config get globalconfig
$ npm config ls -l
 
找到并打开配置文件:~/.npmrc
写入配置:registry=https://registry.npm.taobao.org

3.验证设置是否成功

npm config get registry
# OR
npm info express

4.重要提醒
不推荐通过cnpm 使用,会出现各种莫名的问题

5.其他淘宝镜像信息
开源镜像: http://npm.taobao.org/mirrors
Node.js 镜像: http://npm.taobao.org/mirrors/node
alinode 镜像: http://npm.taobao.org/mirrors/alinode
phantomjs 镜像: http://npm.taobao.org/mirrors/phantomjs
ChromeDriver 镜像: http://npm.taobao.org/mirrors/chromedriver
OperaDriver 镜像: http://npm.taobao.org/mirrors/operadriver
Selenium 镜像: http://npm.taobao.org/mirrors/selenium
Node.js 文档镜像: http://npm.taobao.org/mirrors/node/latest/docs/api/index.html
NPM 镜像: https://npm.taobao.org/mirrors/npm/
electron 镜像: https://npm.taobao.org/mirrors/electron/
node-inspector 镜像: https://npm.taobao.org/mirrors/node-inspecto

文章作者: Lee

本文地址: https://www.pomelolee.com/2329.html

除非注明,Pomelo Lee文章均为原创,转载请以链接形式标明本文地址

No comments yet.

Leave a comment

Search

相关文章

文章分类

Links

Meta