Ankit
Ankit

Reputation: 57

npm ERR! network request to http://registry.npmjs.org/express failed, reason: connect ETIMEDOUT

when i trying to install express or any npm packeges getting this type of error(without proxy)(node -v 10.14.2)(npm -v 6.4.1)

npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://registry.npmjs.org/express/express failed, reason: connect ETIMEDOUT 104.16.21.35:80
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!     C:\Users\ankit\AppData\Roaming\npm-cache\_logs\2020-10-20T15_26_19_314Z-debug.log

please help me, thank you in advance.

Upvotes: 4

Views: 21696

Answers (4)

A. Lawal
A. Lawal

Reputation: 311

if you can't locate .nmprc file. You can try and use

npm config delete proxy

inside your terminal then try again:

npx create-react-app my-app

Hope it work for you too!

Upvotes: 3

user2578436
user2578436

Reputation: 1

Delete the content of .nmprc file resolves the issue. C:\Users\\.nmprc

Upvotes: 0

Emkay
Emkay

Reputation: 1

I have experienced the same problem before and since I did not need a proxy I deleted the .npmrc file in the User/name directory. I hope it works

Upvotes: 0

I0I
I0I

Reputation: 21

I had this problem today and after doing some research this is what I did.

Inside my Users/name it is a file call .nmprc. I open it (as a text editor) and there was a proxy that I try to set. something like this:

proxy=http://yourorganizationproxy.com:8080
https-proxy=http://yourorganizationproxy.com:8080

So I decided to delete both of then an save the file.

I tried again to execute npx create-react-app my-app and it worked.

Hope this works for you too!

Upvotes: 2

Related Questions