1.下载,选择稳定版就好 下载 | Node.js 中文网
安装完验证:
win+R 输入cmd
输入 node -v
npm -v
2.配置环境变量
3.更换npm源为淘宝镜像
1)查看当前源 npm config get registry
2)更换镜像 npm config set registry https://registry.npm.taobao.org/
4.安装基于淘宝源的cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org
验证: cnpm -v