How to clear https proxy setting of NPM?

前端 未结 30 2049
长发绾君心
长发绾君心 2020-11-29 14:59

How can I clear the previous ssl proxy setting of NPM? well, I search a lot, but all post I got is mainly about how to set proxy in corporate network.

相关标签:
30条回答
  • 2020-11-29 15:15

    I think it's not http-proxy but proxy:

    npm config set proxy="http://yourproxyhere"
    
    0 讨论(0)
  • 2020-11-29 15:16

    In the latest version npm rm proxy does not work. Instead use npm rm http-proxy

    npm config rm proxy npm config rm https-proxy

    0 讨论(0)
  • 2020-11-29 15:16

    Running npm version 2.10.1 in windows 7, I used:

    npm config delete proxy
    npm config delete https-proxy
    
    0 讨论(0)
  • 2020-11-29 15:18

    By the default value npm is looking for packages from https://registry.npmjs.org. What you also need to do is override the registry and strict-ssl values.

    npm config set registry "http://registry.npmjs.org"
    npm config set strict-ssl false
    
    0 讨论(0)
  • 2020-11-29 15:18

    I have used the below commands for removing any proxy set:

        npm config rm proxy
        npm config rm https-proxy
    

    And it solved my problem :)

    0 讨论(0)
  • 2020-11-29 15:18

    I had the same problem once.
    Follow these steps to delete proxy values:

    1.To delete proxy in npm:
    (-g is Important)
    npm config delete proxy -g
    npm config delete http-proxy -g
    npm config delete https-proxy -g

    Check the npm config file using:
    npm config list

    2.To delete system proxy: set HTTP_PROXY=null set HTTPS_PROXY=null

    Now close the command line and open it to refresh the variables(proxy).

    0 讨论(0)
提交回复
热议问题