NPM 配置指南
代理设置
设置代理
- 设置 HTTP 代理
bash
npm config set proxy http://你的代理IP:端口npm config set proxy http://你的代理IP:端口- 设置 HTTPS 代理
bash
npm config set https-proxy http://你的代理IP:端口npm config set https-proxy http://你的代理IP:端口清除代理
- 清除 HTTP 代理
bash
npm config delete proxynpm config delete proxy- 清除 HTTPS 代理
bash
npm config delete https-proxynpm config delete https-proxy镜像源配置
切换为淘宝镜像源
bash
npm config set registry https://registry.npmmirror.comnpm config set registry https://registry.npmmirror.com还原为官方源
bash
npm config set registry https://registry.npmjs.orgnpm config set registry https://registry.npmjs.org
冷冷的火花