×

npm设置和取消代理的方法

2021-03-02 12:37:25 Falcon
  • 查看npm的设置

npm config list

 

  • 设置代理

npm config set proxy http://127.0.0.1:2020

  • 修改 registry

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

 

  • 带用户名和密码验证的代理

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

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

 

  • 取消代理

npm config delete proxy

npm config delete https-proxy

 

本文收录于