I was trying to instal Ionic framework in my Windows 8 system and was trying to install Cordova first.
I\'m getting this error while trying to install Cordova, that
In my case all Internet access must run through a proxy and npm was not configured with the proxy to reach http://registry.npmjs.org.
I ran npm install --log-level verbose to get more information and saw that the response had HTML stating I was not authenticated with the proxy.
Running the following fixed it (replacing below with your username/password/proxy address:
npm config set proxy 'username:password@your.proxy.com'
npm config set https-proxy 'username:password@your.proxy.com'
I do not advise putting the password in raw text instead using something like cntlm to set up a local proxy that delegates to the real proxy.