angular-cli
angular-cli copied to clipboard
ng update takes from registry.npmjs.com rather than github
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)
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.
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.
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.
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.