How to remove/ reset npm proxy

node.jsPROXY

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.

Best Answer

It was a connection problem.

I remember that I 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 ran

npm config edit

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

Note: you might need to reboot as mentioned in 王子1986's comment.

Related Question