Node.js npm换源

2019年10月20日 1265点热度 0人点赞 0条评论

今天在用 LayuiAdmin 开发时需要使用 Node.js 的gulp构建。但尝试 npm install gulp -g 的时候过了许久也没有丝毫动静。检查发现是镜像在国外导致访问过慢。

知道原因了那就对症下药,切换 npm 源到国内阿里镜像

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

npm install gulp -g 安装速度直接起飞

耗子

练习时长 4 年半的个人程序员 喜欢PHP、Go、Vue 和 Python Music~

文章评论

Loading...