npm ERR! network getaddrinfo ENOTFOUND
Maybe it's because the proxy do not stand for https. What I do is clear the proxy content of ~/.npmrc, or use
npm config delete proxy
What's more, nrm is recommended for this problem.
Instead of setting the proxy usingnpm config set http_proxy=http://address:8080
go to ~/.npmrc and remove the proxy config. This resolved my issue.
I was setting proxy as
npm config set http_proxy=http://domain:8080
instead of using the correct way
npm config set proxy http://domain:8080