Skip to content
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

Expand documentation for ng update #12243

Closed
brian428 opened this issue Sep 11, 2018 · 3 comments · Fixed by #18888
Closed

Expand documentation for ng update #12243

brian428 opened this issue Sep 11, 2018 · 3 comments · Fixed by #18888
Labels
area: docs Related to the documentation ng update DX

Comments

@brian428
Copy link

I'm trying to do something that should be utterly trivial: update an Angular CLI 6.1.1 app to the latest version of 6.x.

Apparently, I'm supposed to use ng update to do this. But I have absolutely no idea what this command actually does, and the docs don't help at all.

Consider:

>ng update
    We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       6.1.1 -> 6.2.1           ng update @angular/cli
      @angular/core                      6.1.1 -> 6.1.7           ng update @angular/core
      rxjs                               6.2.2 -> 6.3.2           ng update rxjs


    There might be additional packages that are outdated.
    Or run ng update --all to try to update all at the same time.

Hmm...OK, I'm positive that more than cli and core need to be updated. Why aren't the other packages listed? There's a note that "there might be additional packages that are outdated". Might? Can't the CLI see exactly what needs updating?

But OK, let's try it with --all and use --dry-run to try and see what will happen:

>ng update --all --dry-run
                  Package "bootstrap" has a missing peer dependency of "popper.js" @ "^1.14.3".
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.3")
                  Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.3").
Incompatible peer dependencies found. See above.

OK, now I'm even more confused. Why is ng update doing anything with bootstrap? And compiler-cli wasn't even listed in the earlier list. Finally, if ng update is going to update compiler-cli, shouldn't it know that typescript (obviously being a dependency of compiler-cli) would be getting updated too?

Basically, I have no idea what's going on or what's going to happen if I run ng update --all. What will be updated? Right now, it sounds like I just have to run it and hope that it knows what it's doing.

I think a lot of confusion could be avoided if the ng update docs were more than one (vague) sentence long. I'd take a shot at updating the docs myself, but I literally have no idea what this command actually does (other than "it updates something"). Could someone take a few minutes and expand the docs on this command? Because I assume that in-version updates like this are far more common than full version updates.

@alan-agius4 alan-agius4 added the area: docs Related to the documentation label Sep 12, 2018
@brianivander
Copy link

brianivander commented Sep 22, 2018

I have the same problem:
Package "@angular/compiler-cli" has an incompatible peer dependency to "typescript" (requires ">=2.7.2 <2.10", would install "3.0.3")

How to fix this?

@brian428
Copy link
Author

It’s worth noting that a year and a half later, every problem I outlined above is still present. I get that no one likes to update documentation, but come on folks. Please have someone spend 15 minutes to write more than one sentence on this essential command?

alan-agius4 added a commit that referenced this issue Sep 29, 2020
'--all' functionality has been removed from `ng update` as updating multiple packages at once is not recommended. To update the depencencies in your workspace 'package.json' use the update command of your package manager.

Closes #15278
Closes #13095
Closes #12261
Closes #12243
Closes #18813
@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 Oct 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to the documentation ng update DX
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants