0

I'm trying to run the "npm install" command in my react project on windows, this was working a few days ago, but now I keep getting the following error message:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/@date-io%2fmoment failed, reason: getaddrinfo EAI_AGAIN web-proxy.sdc.hpecorp.net

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\myuser\AppData\Local\npm-cache\_logs\2023-04-17T07_59_06_601Z-debug-0.log"

I have tried several solutions such as changing my DNS to 8.8.8.8, reinstalling Node.js, and connecting to other networks, but none of them worked. Interestingly, other computers on the same network can run "npm install" without any issues.

I have also looked at this Stack Overflow question (getaddrinfo EAI_AGAIN registry.npmjs.org:80) and tried the suggested solutions, but they didn't work for me.

Can anyone suggest any other solutions or point me in the right direction? Thank you in advance for your help!

RGVylar
  • 1
  • 3
  • 1
    What's web-proxy.sdc.hpecorp.net, is it a corporate proxy? Usually errors like that are results of local network misconfiguration, and have little to do with Node/npm itself. – raina77ow Apr 17 '23 at 08:18
  • I think it is, but I work from home with a corporate laptop. This command was working for months, and suddenly a few days ago started failing. The only change I made was downloading my Git branch from scratch to test a clean installation, and it worked the first time, but the second time it started giving this error. – RGVylar Apr 17 '23 at 08:24
  • Have you tried the remedies mentioned by the [mothership issue](https://github.com/npm/npm/issues/15059) itself? In any case, I'd suggest checking whoever manages that proxy first. It might happen so it became non-DNS-resolvable in your network; if that's the case, adding its IP to /hosts file might help. – raina77ow Apr 17 '23 at 08:28
  • Yes, i tried some of the solutions there just now, for example: ```npm config get proxy: npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. null``` From the ping i do get respones, and if i dive into the browser, i get the json correctly, it just doesnt work on the cmd console. – RGVylar Apr 17 '23 at 08:34
  • What's the output of `nslookup web-proxy.sdc.hpecorp.net` run in cmd? – raina77ow Apr 17 '23 at 08:48
  • DNS request timed out. timeout was 2 seconds. Servidor: UnKnown Address: 212.166.132.110 DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. *** Se agotó el tiempo de espera de la solicitud a UnKnown – RGVylar Apr 17 '23 at 09:05

1 Answers1

0

I am writing to inform you that the issue I was experiencing with running "npm install" in my React project on Windows has been resolved. Although I tried several solutions, such as changing my DNS and reinstalling Node.js, the problem persisted until recently, when the issue resolved itself without any further changes made on my end.

RGVylar
  • 1
  • 3