1、设置代理
npm config set proxy=http://ip:prot
2、取消代理
npm config rm proxy
npm config rm https-proxy
npm config set registry http://registry.npmjs.org/
npm config set registry https://registry.npmjs.org/
在使用Ie开启代理后,npm要设置代理,在未使用代理时,要关闭代理!!!
3、清楚缓存
npm cache clean --force
4、更新npm版本
npm install -g npm@latest