一、npm官网地址
https://www.npmjs.com
二、npm镜像
// 不需要使用cnpm,两个命令换着使用没有必要
// 设置镜像(淘宝镜像最新地址)
npm config set registry https://registry.npmmirror.com
// 还原镜像地址为默认地址
npm config set registry https://registry.npmjs.org/
// 获取镜像地址
npm config get registry
三、npm版本切换
npm install npm@5.4.0 -g
npm install npm@latest -g