I need to download several packages through npm but our corporate proxy configuration is a .pac file (i'm on windows)
I have already tried
npm config set proxy http://mydomain\username:password@1.2.3.4:8181/proxy.pac
npm config set https-proxy http://mydomain\username:password@1.2.3.4:8181/proxy.pac
or
npm config set proxy http://1.2.3.4:8181/proxy.pac
npm config set https-proxy http://1.2.3.4:8181/proxy.pac
but it doesn't work...
any suggestion? thanks
You must use "npm config set http-proxy"
use:
At work we use ZScaler as our proxy. The only way I was able to get npm to work was to use Cntlm.
See this answer:
NPM behind NTLM proxy
I had a similar issue and I tried all the workarounds above but none of them worked for me ( I was using special characters (like '@' symbol) in my password and I also needed to add domain name).
Apart from that I was bit apprehensive to add my password as plain text. It turned-out the easiest solution to overcome all these challenges was to use some sort of reverse proxy (like Fiddler).
I have already detailed the configuration steps in this answer in SO.
The NPM proxy setup mentioned in the accepted answer solve the problem, but as you can see in this npm issue, some dependencies uses GIT and that makes the git proxy setup needed, and can be done as follow:
The NPM proxy setup mentioned:
From a little search on google the first thing I tried was this
But still npm seemed to lose connection when trying to do "npm install"s. then I ran this line in command prompt and now I can use npm install
Try this, Set proxy in npm as follows