4

node -v 8 and npm -v 5. Trying to install angular/cli globally from yesterday. Facing new error everytime.

Vipins-Air:~ vipingupta$ sudo npm install -g @angular/cli npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to http://registry.npmjs.org/@angular%2fcli failed, reason: connect ETIMEDOUT 74.122.238.10:8080 npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! /Users/vipingupta/C:Devnodejsnpm-cache/_logs/2017-06-07T06_37_13_337Z-debug.log

5
  • try this npm config delete proxy Commented Jun 7, 2017 at 6:44
  • Try updating your npm to the latest version. Commented Jun 7, 2017 at 6:49
  • this can be caused either by a firewall or a proxy. Commented Jun 8, 2017 at 2:39
  • @David R try this npm config set proxy null Commented Jun 8, 2017 at 2:41
  • Are you working in corporate(company proxy) ? If yes , then I have the solution . Commented Jul 2, 2018 at 7:41

7 Answers 7

8

If you are getting the below message:

npm ERR! network 'proxy' config is set properly. See: 'npm help config'

you need to set proxy

$ npm config set proxy http://XXX.XXX.XXX.XXX:XXXX

and

$ npm config set https-proxy http://XXX.XXX.XXX.XXX:XXXX

give your proxy ip address and port number(4digits)

if you dont want to use proxy remove it using below command

$ npm config rm proxy   
$ npm config rm https-proxy

To check the current proxy

$ npm config get proxy
Sign up to request clarification or add additional context in comments.

Comments

5

Remove the proxies by running the following commands.

npm config rm proxy

npm config rm https-proxy

It should work now.

Comments

1

try

npm config set proxy http://USERNAME:PASS@IP_Address:PORT_NO/
  • don't delete http://
  • USERNAME is your name in your physique machine
  • PASS is your password in your physical machine

After that try to install your packages for example: npm install -g @angular/cli

1 Comment

I have tried using the npm config set proxy. But I was still facing the issue. Then I opened the command line in the project folder and use set http_proxy=_proxy_name_. This worked for me
0

Try to clean cache "npm cache clean"

uninstall angular-cli "npm uninstall -g angular-cli"

install again "npm install -g angular-cli"

If this doesn't work, use Force flag (-f).

And also make sure your network connection is descent.

1 Comment

facing issue same again:- I run sudo npm cache clean --force, sudo npm uninstall -g @angular/cli, sudo npm install -g @angular/cli
0

1.) try "npm config set proxy http://USERNAME:PASs@IP_Address:PORT_NO/"

2.) Make sure that the proxy is set by running the below command npm config get proxy

3.) After that when we try to install it was working fine.

Comments

0

Reset the firewall settings

in windows 10 go to Setting -> Update & security -> Windows Security -> FireWall & Network protection

and click on Restore firewalls to default

good luck

Comments

0

I had the same issue when trying to do an npm install. none of the above solutions worked for me. However, because it was mentioned that it may had something to do with a proxy, I decided to check the files and found that a file "yarn.lock" was the culprit. It had proxy settings that blocked my connection. I renamed the file to yarn.lock.old and gave it another go. Lo' and behold, node package manager was installing. So, that may be something else to look at.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.