Angular-cli: ng update - "Client authentication required" behind authenticated corporate proxy

Created on 5 May 2018  路  6Comments  路  Source: angular/angular-cli

Versions

@angular-devkit/architect    0.6.0
@angular-devkit/core         0.6.0
@angular-devkit/schematics   0.6.0
@schematics/angular          0.6.0
@schematics/update           0.6.0
rxjs                         6.1.0
typescript                   2.8.3

Repro steps

Run ng update @angular/cli --registry=http://my-company.local/my-custom-npm-registry/

Observed behavior

Unexpected token T in JSON at position 0
TF400813: Resource not available for anonymous access. Client authentication required.

Desired behavior

ng update runs successfully and updates my project

Mention any other details that might be useful (optional)

I am behind a corporate proxy which requires authentication. It looks like the proxy is being used for my request, but I can't work out from where it is picking up the notion that it should use a proxy to access my custom NPM registry on my local network. It is definitely not getting the proxy address from:

  • .npmrc in the current directory
  • .npmrc in my user profile
  • HTTP_PROXY environment file
  • Visual Studio Code settings

npm install works fine from the same directory.

Most helpful comment

^ +1 having the same issue with private npm registry in Microsofts VSTS environment.

All 6 comments

@Experiencing the same issue from a similar setup. Running npm install @angular/cli seemed to work, but when running ng update from that point forward I received the same error message.

I was able to get around this issue by temporarily removing my .npmrc file and removing any references to any non-npmjs npm packages in package.json.

Also getting this error - we use an internal package feed with token auth as a proxy to get our node_module.s

^ +1 having the same issue with private npm registry in Microsofts VSTS environment.

Dupe of #10624

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings