镜像源改为国内淘宝镜像

1,035 阅读1分钟

一、方法一

1、查看当前镜像的配置

npm config get registry

2、切换到淘宝镜像

npm config set registry registry.npm.taobao.org

二、方法二

1、使用nrm工具切换到淘宝源

npx nrm use taobao

2、如果之后需要切换回官方源可使用

npx nrm use npm