第一种方案: 使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
然后再用: cnpm install 即可解决.当然有时候cnpm不好使的时候,就用
第二种方案: npm 使用淘宝的镜像下载
npm config set registry https://registry.npm.taobao.org
然后在用: npm install 即可.
本文介绍了两种方法来加速npm包的安装。首先,通过运行'npm install -g cnpm --registry=https://registry.npm.taobao.org'全局安装cnpm,之后使用'cnpm install'进行安装。当cnpm不可用时,可以设置npm的registry为淘宝镜像:'npm config set registry https://registry.npm.taobao.org',然后使用'npm install'。这两种方式都能有效提高在中国地区的npm包下载速度。
第一种方案: 使用cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
然后再用: cnpm install 即可解决.当然有时候cnpm不好使的时候,就用
第二种方案: npm 使用淘宝的镜像下载
npm config set registry https://registry.npm.taobao.org
然后在用: npm install 即可.
931
4万+

被折叠的 条评论
为什么被折叠?