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
I had similar problem. I rаn npm cache clear
, closed android SDK manager(which was open before) and re-ran npm install -g cordova
and that was enough to solve the problem.
I had this same problem when trying to upgrade pm2 to the latest version.
Thanks to sdm's answer I did npm update npm -g
and it did the trick for me.
For me following fixed the issue:
In this case Git proxy may not be required.
first I had to delete my registry by using npm config delete registry
and register new value using npm config set registry "http://registry.npmjs.org"
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.
I had the same issue and the following fixed my issue: