Skip to content

npm 切换源 ​

1. 查看当前的源: ​

bash
npm config get registry

2. 切换为官方源: ​

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

3. 切换为淘宝源: ​

bash
npm config set registry https://registry.npm.taobao.org/