如何解决npm下载慢的问题

一、使用cnpm
1.使用阿里定制的 cnpm 命令行工具代替默认的 npm,输入下面代码进行安装:
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
以后安装插件只需要使用cnpm intall即可。
二、仍然使用npm,只进行换源
输入以下命令:
npm config set registry https://registry.npm.taobao.org
再输入:
npm config list
可以看到,已经换源了

posted @ 2020-10-13 10:15  sct春天  阅读(248)  评论(0)    收藏  举报