1

I`m new to nodejs and npm, my terminal shows me one error when I try to install anything with npm, here is a screenshot enter image description here

I remember that I played with proxy configuration like this :

npm config set proxy http://localhost:8080/
npm config set https-proxy http://localhost:8080/
npm config set strict-ssl false

and that was to solve another issue with npm. here is the previous error enter image description here

please help.. thanks in advance.

6

It was a connection problem.

I remember thatI played with proxy configuration by mistake like this :

   npm config set proxy http://localhost:8080/
   npm config set https-proxy http://localhost:8080/
   npm config set strict-ssl false

which made npm client attempts to hit localhost:8080 to pull the module rather than the correct internet endpoint.

so after couple of days of frustration i visited this link

https://docs.npmjs.com/cli/config

then run

npm config edit

which opened a file inside that file i removed those three lines i added above , then everything worked fine.

  • + I have to reboot . – 王子1986 Dec 17 '16 at 1:48
  • Thanks for the awesome answer. Removing the proxy with: npm remove proxy or npm remove https_proxy _did not work. Neither did clearing or cleaning the cache! – Beezer May 18 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.