1.通过cnpm使用淘宝镜像:
npm install -g cnpm --registry=https://registry.npm.taobao.org
2.将npm设置为淘宝镜像:
npm config set registry https://registry.npm.taobao.org
3.查看npm镜像设置:
npm config get registry
4.查看cnpm镜像设置:
cnpm config get registry
本文介绍如何利用cnpm工具配置淘宝npm镜像。主要包括安装cnpm并将其指向淘宝镜像源,以及如何检查镜像设置是否正确。这对于提高国内开发者安装Node.js包的速度非常有用。
1.通过cnpm使用淘宝镜像:
npm install -g cnpm --registry=https://registry.npm.taobao.org
2.将npm设置为淘宝镜像:
npm config set registry https://registry.npm.taobao.org
3.查看npm镜像设置:
npm config get registry
4.查看cnpm镜像设置:
cnpm config get registry
2万+
4024

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