0

I'm behind a company proxy and trying to access npm packages from nexus repository hosted on the same proxy. I can login to the nexus repository from browser using the same username and password but not through npm cli

Here is what my .npmrc file looks like

http-proxy=http://username:password@companyproxy.com:8080
https-proxy=http://username:password@companyproxy.com:8080/
email=email@companyproxy.com
always-auth=true
registry=http://customrepository.com
strict-ssl=false
no_proxy=.companyproxy.com
_auth="someauthtoken"

Here is the error i'm getting:

npm install -g @angular/cli
npm ERR! code E401
npm ERR! 404 401 Unauthorized: @angular/cli@latest
Kalyan
  • 3
  • 3
  • If you login to the UI can you pull down npm components, specifically the component you get the error from? It's possible your user doesn't have access. – joedragons Mar 30 '18 at 18:37

1 Answers1

0

As it turns out, the issue was regarding authentication. I was passing the incorrect auth token all along.

Worked fine as soon as the correct token was passed.

Kalyan
  • 3
  • 3