1.将node安装到D:\Program Files\nodejs目录。
2.设置npm全局安装路径与缓存路径
npm config set prefix "D:\Program Files\nodejs\node_global" npm config set cache "D:\Program Files\nodejs\node_cache"
3.安装cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
4.查看cnpm是否可用
cnpm -v