0
点赞
收藏
分享

微信扫一扫

npm源的切换

罗蓁蓁 2022-01-17 阅读 137
npmnode.js

1、查看当前的镜像地址

npm get registry

设成淘宝

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

将npm替换为cnpm

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

全局安装yarn

cnpm install yarn -g

2.换成原来的镜像地址

npm config set registry https://registry.npmjs.org/
举报

相关推荐

0 条评论