I am getting npm ERR! network getaddrinfo ENOTFOUND error while trying to install any package using NPM. I know there are numerous threads on the same issue but
Take a look at your HTTP_PROXY and HTTPS_PROXY environment variables.
I thought mine were set correctly, as http://username:password@proxyhost:proxyport, but it turned out that they were actually causing the problem! After deleting those variables, and restarting the commant prompt, the npm commands worked again.