win+x进入命令提示符(管理员)输入如下指令:
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
npm cache clean # 清空缓存
然后输入: npm install cnpm -g
本文介绍如何通过命令提示符设置NPM的Taobao镜像,包括注册模块镜像、编译依赖的Node源码镜像及清理缓存的方法。
win+x进入命令提示符(管理员)输入如下指令:
npm set registry https://registry.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
npm cache clean # 清空缓存
然后输入: npm install cnpm -g
转载于:https://my.oschina.net/u/3254591/blog/1510601
1863

被折叠的 条评论
为什么被折叠?