6

Hi guys I'm trying to publish my angular library in npm, but when I login I get this:

npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to http://registry.npmjs.org/-/user/org.couchdb.user:belzee10 failed, reason: getaddrinfo EAI_AGAIN registry.npmjs.org:80
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\belzee\AppData\Roaming\npm-cache\_logs\2018-01-08T16_03_35_050Z-debug.log

versions

node: 8.9.3
npm: 5.5.1

I am behind an authenticated proxy and I have already configured: proxy and https-proxy

npm config set proxy http: // Username: Pa55w0rd @ proxyhostname: port
npm config set https-proxy http: // Username: Pa55w0rd @ proxyhostname: port

Thank you for your attention

Martin Brisiak
  • 3,473
  • 12
  • 35
  • 49
Ivan Perez Abreu
  • 69
  • 1
  • 1
  • 5

8 Answers8

8
npm config rm proxy
npm config rm https-proxy

Use the above commands and restart the system. It worked for me.

Pavan
  • 476
  • 4
  • 14
4

This drove me crazy for hours and I didn't even know what I did to make it work. But the last thing I tried was:

In cmd typed ping registry.npmjs.org. Error couldn't find the host

Open hosts file through this: https://support.rackspace.com/how-to/modify-your-hosts-file/

Added 151.101.72.162 registry.npmjs.org to a new line. Save.

Tried installing a package, still didn't work

But I randomly tried to ping registry.npmjs.org again, and it worked!

Tried installing a package again, still didn't work.

Removed the 151.101.72.162 registry.npmjs.org and saved again. Practically reverting the last edit.

Tried installing and it's working now. Why???? I have no idea. For all I know there's a minor deity inside my laptop and I randomly appeased it somehow...

Irun S
  • 51
  • 4
1

Try to connect to some other network.

This error resemble some issue with network. I was trying to install a lib from NPM on windows but getting this error. This worked for me. Maybe it might help you too.

abhay tripathi
  • 2,715
  • 3
  • 16
  • 23
1

The following github link resolved the issue for me ->

https://github.com/StefanScherer/dockerfiles-windows/issues/270#issuecomment-382229052

create the file /etc/docker/daemon.json

and insert:

{
    "dns": ["10.0.0.2", "8.8.8.8"]
}

and then restarting pc

Aniruddha
  • 50
  • 2
  • 7
0

That error means a domain name resolution error in Node. I'm not sure what exactly could be your issue here, but https://www.codingdefined.com/2015/06/nodejs-error-errno-eaiagain.html has some good info. This error is definitely due to the proxy you have set up. I had a similar issue earlier, and disabling the proxy worked for me.

ameyaraje
  • 129
  • 2
  • 15
0

First run npm i npm@latest and check error is coming again or not. if it is Try to resolve your proxy settings

For Linux(ubuntu) https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-configure-proxy-on-ubuntu-18-04/

For windows https://www.howtogeek.com/tips/how-to-set-your-proxy-settings-in-windows-8.1/

0

I had the same problem you can check if you opening a session that connecting database, you can try disabling any sessions on the database and try again using npm i filepond

0
  1. Changed the registry as https://registry.npmjs.org/ in .npmrc file.

In terminal:

  1. npm config rm proxy
  2. npm config rm https-proxy
  3. Restarted the system. npm i worked :-)
st.huber
  • 1,311
  • 2
  • 22
  • 41