NodeJs学习与研究
淘宝镜像的地址: http://npm.taobao.org/
1.安装cnpm, 这个设置 是相当于又安装了一个包管理工具,原有的npm的还是以官方的资源安装,使用cnpm命令则会使用 淘宝镜像库
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install xxx
2. 直接更改原来npm的镜像库位置
npm config set registry https://registry.npmmirror.com
验证更改情况
npm config get registry
常用命令
设置全局安装目录
npm config set cache “D:\nodejs\node_cache”
npm config set prefix “D:\nodejs\node_global”
查看版本
node -v
npm -v
npm config ls -l