npm之使用淘宝源
暂时使用:
1 | npm --registry https://registry.npm.taobao.org i express |
永久使用:
1 | npm conf set registry https://registry.npm.taobao.org |
安装检测用cnpm -v就可以检测到安装路径等。
通过cnpm使用:
1 | npm i -g cnpm --registry=https://registry.npm.taobao.org |
实例使用(npm一律改为cnpm即可) :
1 | cnpm i express |