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

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

    Have you tried command-line options instead of the .npmrc file?

    I think something like npm --proxy http://proxy-server:8080/ install {package-name} worked for me.

    I've also seen the following: npm config set proxy http://proxy-server:8080/

提交回复
热议问题