在cmd中输入 npm install -g cnpm --registry=https://registry.npm.taobao.org 即可将npm指向国内镜像源 之后输入cnpm -v 可以查看版本 接下来我们就可以用cnpm代替npm了