Home > Mobile >  How to Upgrade Angular 7 to Angular 13
How to Upgrade Angular 7 to Angular 13

Time:05-13

I have a Angular material project that is very outdated and I need to updated to 13

After running npm outdated I see these results

enter image description here

According to the enter image description here

When running this command:

ng update --all --force

enter image description here

CodePudding user response:

You go step by step, as the documentation tells you.

You can add a --force to the upgrade command. Then it will ignore all these incompatible peer dependencies. You can then try to start your app, if it works, all is good.

If it doesn't, you upgrade the packages that make problems.

Repeat this step for each major version change of angular.

Second error tells you to try adding the following flag: retry this command with --force, or --legacy-peer-deps

Does this help you solve the issue?

CodePudding user response:

You can use ng update --all --force or npm install --save --legacy-peer-deps. It basically avoids/ignores all the dependency-checks and updates all the packages wherever applicable. Although it is not recommended generally, I had to do the update this way as other suggestions seemed to be not working for me.

  • Related