1.卸载原有旧的版本:

npm uninstall -g cnpm --registry=https://registry.npm.taobao.org

2.注册模块镜像:

npm set registry https://registry.npm.taobao.org

3.node-gyp 编译依赖的 node 源码镜像

npm set disturl https://npm.taobao.org/dist

4.清空缓存

npm cache clean --force

5.重新安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

此文转载自:cnpm卸载与安装步骤 - 简书1.卸载原有旧的版本: 2.注册模块镜像: 3.node-gyp 编译依赖的 node 源码镜像 4.清空缓存 5.重新安装cnpmhttps://www.jianshu.com/p/c46d1f69a76b

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐