npm修改源

1、命令行临时使用指定镜像(淘宝)

npm --registry https://registry.npm.taobao.org install express
复制
2、命令行永久更改使用指定镜像(淘宝)

npm config set registry https://registry.npm.taobao.org
3.其他命令

查看npm源地址有没有换成功:

npm config get registry

4.重置为官方源:

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

posted @ 2022-12-11 19:51  Arborblog  阅读(174)  评论(0编辑  收藏  举报