npm 更换源

1. 查看当前源

npm config get registry

2. 更换npm源为国内淘宝镜像

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

3. 更换npm源为国内npm官方镜像

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

4. 还原npm源

npm config set registry https://registry.npmjs.org/
posted @ 2022-09-27 18:20  叶森白  阅读(5338)  评论(0编辑  收藏  举报