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
Because I still have problems with setting proxy settings at work and turning them off at home, I have scripted and publish npm-corpo-proxy.sh. In every corpo the password has to be changed often and must contain special chars, which must be encoded before feeding npm config (the same for backash form domain\user).
I've just had a very similar problem, where I couldn't get npm to work behind our proxy server.
My username is of the form "domain\username" - including the slash in the proxy configuration resulted in a forward slash appearing. So entering this:
then running this
npm config get proxy
returns this: http://domain/username:password@servername:port/Therefore to fix the problem I instead URL encoded the backslash, so entered this:
and with this the proxy access was fixed.
You will get the proxy host and port from your server administrator or support.
After that set up
If there any special character in password try with % urlencode. Eg:- pound(hash) shuold be replaced by %23.
This worked for me...
Use below command at cmd or GIT Bash or other prompt
where 192.168.1.101 is proxy ip and 4128 is port. change according to your proxy settings.
Adding the lines below in the .typingsrc file helped me.
You can check Fiddler if NPM is giving Authentication error. It is easy to install and configure. Set Fiddler Rule to Automatically Authenticated.In .npmrc set these properties
It worked for me :)