Home > Back-end >  Updating all Angular components
Updating all Angular components

Time:06-15

Is there a single command that would upgrade all my Angular components?

When I do ng v in a VS Code terminal (globally) to see my Angular version, I get this:

enter image description here

However, when I go into my project's directory, I get the following:

enter image description here

Is there any way I can upgrade everything to the latest existing versions without having to run commands for every single component?

CodePudding user response:

You should update to next major first, so the ideal path from 12 to 14 is via 13.

  1. ng update @angular/core@13 @angular/cli@13
  2. ng update @angular/core@14 @angular/cli@14

You might want to commit the changes or use --allow-dirty while upgrading.

  • Related