NodeJS NPM Proxy error when installing grunt

后端 未结 11 1994
太阳男子
太阳男子 2020-12-25 13:58

When I\'m trying to install grunt via npm, I\'m getting a following error:

C:\\Program Files\\nodejs\\node_modules\\npm>npm inst         


        
11条回答
  •  别那么骄傲
    2020-12-25 14:52

    This configuration works for me. You need to check your http and https ports (usually they are 80 and 443 respectively), but in my case I am using port 80 for both.

    npm config set proxy http://user:password@proxy.url.com:80
    
    npm config set https-proxy http://user:password@proxy.url.com:80
    

    You can check your proxy settings by get command

    npm config get proxy
    
    npm config get https-proxy
    

提交回复
热议问题