Skip to content

ng update gives error when dependency is local only #10614

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
hodlbank opened this issue May 3, 2018 · 9 comments
Closed

ng update gives error when dependency is local only #10614

hodlbank opened this issue May 3, 2018 · 9 comments

Comments

@hodlbank
Copy link

hodlbank commented May 3, 2018

Versions

Angular CLI: 6.0.0-rc.10
Node: 8.11.1
OS: linux x64
Angular: 6.0.0-rc.6
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.5.13
@angular-devkit/core         0.5.13
@angular-devkit/schematics   0.5.13
@angular/cdk                 6.0.0-rc.14
@angular/cli                 6.0.0-rc.10
@angular/material            6.0.0-rc.14
@schematics/angular          0.5.13
@schematics/update           0.5.13
rxjs                         6.0.0
typescript                   2.8.3

Repro steps

  • have Angular 5.x project with local-only dependencies, i.e. dependency added into package.json but does not exist in the npmjs.org repository .
  • run ng update @angular/cli in order to convert .angular-cli.json into proper .angular.json

Observed behavior

> ng update @angular/cli --migrate-only --from=1.7.4
Registry returned 404 for GET on https://registry.npmjs.org/some-private-package

Desired behavior

I expect that ng update will just convert my .angular-cli.json into proper .angular.json without digging into my dependencies.

Mention any other details that might be useful (optional)

@hansl hansl added this to the v6.1.0 milestone May 3, 2018
@james-tonicanalytics
Copy link

james-tonicanalytics commented May 4, 2018

I am also experiencing this issue.

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.

@jycouet
Copy link

jycouet commented May 4, 2018

Hello,
I have the same issue!

What is really strange is that I have 2 local packages... And when I removed one, it's working!

@scottleedavis
Copy link

I have this problem too. Also I have the same problem with a github/gitlab reference, see #10642

@thorsten
Copy link

Same issue here.

@Al-Sharif
Copy link

Same here

@hansl
Copy link
Contributor

hansl commented Dec 10, 2018

I think the best way to fix this issue would be to return an EMPTY observable in the logic to request the package.json when it's a local package (here: https://github.com/angular/angular-cli/blob/master/packages/schematics/update/update/npm.ts#L110 …).

It's on our backlog but not our top priority. Would be easy to fix though. Great first bug :)

@daniloff200
Copy link

hey @hansl, @mgechev
I think, this issue can be closed, cause #13167 was merged

@mgechev mgechev closed this as completed Dec 22, 2018
@mgechev
Copy link
Member

mgechev commented Dec 22, 2018

Please, open a new issue if this is still reproducible with the latest CLI, following the template and providing a minimal demo.

@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 Sep 9, 2019
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