Angular-cli: ng update takes from registry.npmjs.com rather than github

Created on 4 May 2018  路  8Comments  路  Source: angular/angular-cli

Versions

Angular CLI: 6.0.0
Node: 8.11.1
OS: darwin x64
Angular: 6.0.0

Repro steps

  • Add a github package to your package.json, team/repo-name should work, or with tarball: https://api.github.com/repos/team/repo-name/tarball.
  • Run ng update

Observed behavior

$ ng update @angular/cli
Registry returned 404 for GET on https://registry.npmjs.org/repo-name

Desired behavior

It shouldn't look to registry.npmjs when a github version is referred.

Mention any other details that might be useful (optional)

schematicupdate medium broken triage #1 bufix

Most helpful comment

Any news about this issue? We tried migrating to Angular 7, but ng update failed with 404 due to calls to the wrong registry...

All 8 comments

from #10614 , to temporarily get past this
@james-tonicanalytics

The temporary solution that stopped the error occurring was to delete the local dependency from the package.json file and then run ng update @angular/cli. Once the .angular-cli.json was migrated to angular.json, I added the local dependency back in.

Not sure if this helps, I'm using a private npm registry and uses npm login --registry=url.
Angular CLI should read from ~/.npmrc instead?

Commenting out the dependency in package.json resolves it but it would be great even a simple and lazy solution as preventing the update from stopping.
Please Google fix this :)

Any news about this issue? We tried migrating to Angular 7, but ng update failed with 404 due to calls to the wrong registry...

I am also having an issue with this. I have a private registry set in my global npmrc (and yarnrc) and the cli seems to be playing by it's own rules rather than respecting the global config. I also tried setting a local npmrc file and had the same issue.
404 Not Found - GET https://registry.npmjs.org/mypackage- Not found

Any update on this issue?
When will it be possible to configure the npm registry used by ng update/ng cli?
Please kindly reply...

The Angular CLI will honor the configuration found in .npmrc files. If you are encountering issues in this regard please open a separate issue detailing the problem.
This issue pertains to the use of non-registry sourced dependencies (file, git, directory, etc.). Analyzing such dependencies is not currently supported via ng update but as of 9.1 they will no longer cause an error.

@clydin Thanks for the reply and sorry for the misunderstanding. I will open a separate issue.

Was this page helpful?
0 / 5 - 0 ratings