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

前端 未结 29 1005
隐瞒了意图╮
隐瞒了意图╮ 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:37

    Use below command at cmd or GIT Bash or other prompt

    $ npm config set proxy "http://192.168.1.101:4128"

    $ npm config set https-proxy "http://192.168.1.101:4128"

    where 192.168.1.101 is proxy ip and 4128 is port. change according to your proxy settings. its works for me.

提交回复
热议问题