Angular : Getting through that pesky company proxy

Rajesh Kumar Yadav - May 14 '21 - - Dev Community

If you are attempting to get an Angular site running on your Windows work computer at XYZ Company the chances are that you are having problems getting through the company proxy.

There are (at least) two package managers that need to get through the proxy:

  1. NPM
  2. Typings

For NPM you need to add the following lines to the .npmrc file:

proxy=http://[DOMAIN]%5C[USER]:[PASS]@[PROXY]:[PROXYPORT]/
https-proxy=http://[DOMAIN]%5C[USER]:[PASS]@[PROXY]:[PROXYPORT]/
Enter fullscreen mode Exit fullscreen mode

For Typings you need to add the following lines to the .typingsrc file:

proxy=http://[DOMAIN]%5C[USER]:[PASS]@[PROXY]:[PROXYPORT]/
https-proxy=http://[DOMAIN]%5C[USER]:[PASS]@[PROXY]:[PROXYPORT]/
rejectUnauthorized=false
Enter fullscreen mode Exit fullscreen mode

These files probably don't exist yet, so you can create them as blank text files. They can be added to the project root
(same place as package.json or you can put them in %HOMEPATH% and they will be available to all your projects.

Buy Me A Coffee

With all that being said, I highly recommend you keep learning!

Thank you for reading this article. Please feel free to connect with me on LinkedIn and Twitter.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .