删除代理

npm config delete proxy
npm config delete https-proxy

设置所有代理

npm config set proxy=http://127.0.0.1:8087

设置Https代理

npm config set https-proxy http://server:port

Yarn设置代理还需要

yarn config set strict-ssl false

带密码的代理

npm config set proxy http://username:password@server:port
npm confit set https-proxy http://username:password@server:port