Is there a way to make npm install (the command) to work behind proxy?

前端 未结 29 1370
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 08:08

Read about a proxy variable in a .npmrc file but it does not work. Trying to avoid manually downloading all require packages and installing.

29条回答
  •  爱一瞬间的悲伤
    2020-11-22 08:15

    Just open the new terminal and type npm config edit and npm config -g edit. Reset to defaults. After that close terminal, open the new one and type npm --without-ssl --insecure --proxy http://username:password@proxy:8080 install if you need globally just add -g.

    It worked for me, hope it`ll work for you :)

提交回复
热议问题