参考 https://blog.csdn.net/qq_44624386/article/details/107813078
删除cnpm
npm uninstall cnpm -g
解决无法安装cnpm,cnpm卡顿问题
1) 注册模块镜像
npm set registry https://registry.npm.taobao.org
2) node-gyp 编译依赖的 node 源码镜像
npm set disturl https://npm.taobao.org/dist
3) 清空缓存
npm cache clean --force
4) 安装cnpm(淘宝镜像)
npm install -g cnpm --registry=https://registry.npm.taobao.org