0

I am getting below error while installing angular cli. Please help me

 C:\Users\A737539>npm install -g @angular/cli@6.1.3
    npm ERR! code E502
    npm ERR! 502 Parent proxy unreacheable: @angular/cli@6.1.3

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\A737539\AppData\Roaming\npm-cache\_logs\2018-11-21T09_33_42_128Z-debug.log

Thanks, Pushkar

programoholic
  • 4,830
  • 5
  • 20
  • 59

1 Answers1

0

Here is how you can get npm work when on a proxy network :

create a .npmrc file with below fields :

registry= //local artifactory site if any - remove if not
strict-ssl=false
cache=.\npmcache
prefix=.\npm
package-lock=false
loglevel=verbose
proxy= http://domain\username:password@servername:port/
https-proxy= http://domain\username:password@servername:port/
unsafe-perm=true
sass-binary-site= // if any local binary site is present - remove if not

Now place this file into mentioned location : C:\Users\A737539> and then run npm install command it will work. Once done , You can place this file inside repository (any new app created using cli) so that each time you don't have to set proxies manually.

programoholic
  • 4,830
  • 5
  • 20
  • 59