npm 设置端口代理

查看你的代理端口号

npm 设置端口代理

  • 为npm设置代理端口
$ npm config set proxy http://server:port
$ npm config set https-proxy http://server:port
# 例如
$ npm config set proxy http://127.0.0.1:1087
$ npm i node-saaa

# 删除 http 代理
$ npm config delete proxy
  • 如果代理需要认证的话可以这样来设置
$ npm config set proxy http://username:password@server:port
$ npm config set https-proxy http://username:pawword@server:port
本作品采用《CC 协议》,转载必须注明作者和本文链接
本帖由 Galois 于 3年前 加精
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
未填写
文章
247
粉丝
18
喜欢
217
收藏
62
排名:731
访问:9753
私信
所有博文
社区赞助商