设置代理

1 npm config set proxy=http://127.0.0.1:8087
2 npm config set registry=http://registry.npmjs.org

关于http

经过上面设置使用了http开头的源,因此不需要设http_proxy了,否则还要加一句

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

 代理用户名和密码

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

取消代理

1 npm config delete proxy
2 npm config delete https-proxy

 

相关文章:

  • 2022-02-05
  • 2021-12-26
  • 2022-12-23
  • 2021-05-28
  • 2022-01-02
猜你喜欢
  • 2021-11-24
  • 2022-12-23
  • 2022-01-22
  • 2022-02-21
  • 2021-11-13
相关资源
相似解决方案