5
votes

I receive this error when installing any npm:

30 error Windows_NT 6.1.7601
31 error argv "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "npm" "-g"
32 error node v0.12.7
33 error npm v2.11.3
34 error code ECONNREFUSED
35 error errno ECONNREFUSED
36 error syscall connect
37 error Error: connect ECONNREFUSED at exports._errnoException (util.js:746:11) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1010:19)
37 error { [Error: connect ECONNREFUSED]
37 error code: 'ECONNREFUSED',
37 error errno: 'ECONNREFUSED',
37 error syscall: 'connect' }
38 error If you are behind a proxy, please make sure that the
38 error 'proxy' config is set properly. See: 'npm help config'
39 verbose exit [ 1, true ]

Can you give me any help?

2
And are you behind a proxy? (If not, are you sure? Have you checked with your network administrator?)Quentin
Yes? So did you check that the proxy config was set correctly? Did you read npm help config?Quentin
it's first time im doing it so may be there is a problem in the configuration any way this is form .npmrc file proxy=domainname:8080 htps-proxy=domainname:8080 https-proxy=domainname:8080user3144678
Possible duplicate of npm ERR! Error: connect ECONNREFUSEDPiqué

2 Answers

2
votes

You should set proxy for npm config first. Please refer to the article below. Hope it will help.

https://jjasonclark.com/how-to-setup-node-behind-web-proxy

1
votes
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

Set the proxies like above and it will work fine

mention your organisation name in company or your organisation's proxy address with port