Getting network error when running npm install -g @angular/cli@latest command

I’m trying to install the latest Angular CLI globally using npm install -g @angular/cli@latest, but I keep getting a network connection error. The error message displays:

npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@angular%2fcli failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
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: C:\Users\IVS16QT\AppData\Local\npm-cache\_logs\2025-03-25T08_19_50_830Z-debug-0.log

It seems like npm cannot reach the registry. I’m unsure if this is a proxy problem or something else in my network configuration. Has anyone faced this issue and managed to resolve it?

had a similar issue, it was my firewall too! try checkin if you can reach the npm registry or switch to another network. also, resetting your proxy settings might help if you’re behind a proxy. gl!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.