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

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

    For me even though python etc will all work though our corporate proxy npm would not.

    I tried

    npm config set proxy http://proxyccc.xxx.ca:8080 npm config set https-proxy https://proxyccc.xxx.ca:8080 npm config set registry http://registry.npmjs.org/

    as instructed but kept getting the same error.

    It was only when I removed https-proxy https://proxyccc.xxx.ca:8080 from the .npmrc file that npm install electron --save-dev worked

提交回复
热议问题