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

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

    A lot of applications (e.g. npm) can use proxy setting from user environment variables.

    You can just add to your environment following variables HTTP_PROXY and HTTPS_PROXY that will have the same value for each one

    http://user:password@proxyAddress:proxyPort

    For example if you have Windows you can add proxy as follow:

提交回复
热议问题