- 临时使用
npm install xxx --registry https://registry.npm.taobao.org
- 查看npm镜像源
npm config get registry
- 设置npm镜像源持久使用
npm config set registry https://registry.npm.taobao.org
npm install xxx --registry https://registry.npm.taobao.org
npm config get registry
npm config set registry https://registry.npm.taobao.org