Skip to content

ng update takes from registry.npmjs.com rather than github #10642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
SamuelMarks opened this issue May 4, 2018 · 11 comments
Closed

ng update takes from registry.npmjs.com rather than github #10642

SamuelMarks opened this issue May 4, 2018 · 11 comments

Comments

@SamuelMarks
Copy link
Contributor

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)

@scottleedavis
Copy link

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.

@beeing
Copy link

beeing commented Jun 25, 2018

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?

@xcash
Copy link

xcash commented Nov 15, 2018

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 :)

@JayceeZ
Copy link

JayceeZ commented Dec 4, 2018

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

@Steven-Harris
Copy link
Contributor

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

@ngbot ngbot bot added this to the Backlog milestone Jan 24, 2019
@balteo
Copy link

balteo commented May 29, 2020

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

@clydin
Copy link
Member

clydin commented May 29, 2020

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.

@balteo
Copy link

balteo commented May 29, 2020

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

@andrewpolemeni
Copy link

andrewpolemeni commented Jul 11, 2022

This issue should not just be from github but for private repo manager URL. The ng update command should be smart enough to see that there is an .npmrc file and then update based on that. Fall back should be the npm registry if it can't find a repo.

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. Luckily, it has already been fixed in one of the recent releases. Please update to the most recent version to resolve the problem.

If the problem persists in your application after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use ng new repro-app to create a new project where you reproduce the problem.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests