I used node.js to install some things via npm without any problems. Now I changed nothing on my settings (Win8; no proxy, internet is working) and I can\'t install anything
I had the same issue while installing the expo-cli in Windows 8.1, but it resolved after i have followed the below steps.
run below command in your command prompt.
npm config edit
.npmrc file will open in your default editor.
Now remove the lines having proxy, https-proxy, registery and save that file.
After that i was able to install the expo-cli package without the proxy issue.
Well, actually, I want to give a comment to your question. Because I have low reputation, it means I can't give a.
If you have a trouble with npm
on Windows. I would suggest you take a look the common errors of npm
on wiki here. Back to your problem, please make sure you are using internet connection along with proxy or not. If you are using it, please do command npm config set proxy
. I found same problem on Stackoverflow and the solution is:
use
npm config set registry http://registry.npmjs.org/
so that npm requests for
http
url instead ofhttps
.and then try the same
npm install
command.
Don't forget to clear your cache by doing npm cache clean
.
Although, this way can solve the problem. You should consider about the security. This way is not the safe way because it can lead to security problem since https
is not used here. I don't recommend to use this on production (thanks @ivarni for pointing this out).
Had the similar issue on Windows 10 with Node v5.0.0
Another solution from here that works for me:
Try to unistall x64 version of Node.js and install x86 one.
The following worked for me
npm config set registry http://registry.npmjs.org/
npm install -g cordova
npm install -g ionic
I was got a similar issue.
I was run below commands
npm config edit
Open that file and remove line no approx 8 proxy=http://github.com/ registry=http://registry.npmjs.org/ those are user custom settings remove this file and save it.
After run below command npm install should be work fine.
I actually had the same problem, from my workplace I could install everything fine, but it wasn't working from home. I found out that the custom DNS I set up on my routeur was the problem, I have reverted to the default internet provider one and everything works fine.