npm設置和取消代理

查看npm的設置

npm config list

設置代理

npm config set proxy http://127.0.0.1:8087
npm config set registry https://registry.npmjs.org

設置https

設置了proxy就不需要設置https-proxy了。

代理用戶名和密碼

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

取消代理

npm config delete proxy
npm config delete https-proxy

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章