I had an Ionic 6 app for over 6 months and it was using Angular 13 and now when I want to install some npm packages, they are being compatible with Angular 15. For example:
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~13.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^15.0.0" from [email protected]
Is there a way to upgrade the Ionic 6 to use the Angular 15 version?
CodePudding user response:
Run command ng update
and it will update for you. First make sure your repository is clean by committing or stashing your changes (if using version control).
CodePudding user response:
You need to update step by step. So will go from 13-14-15 ect... ng update On each step you check for not outdated packages with.
npm outdated
If you would like to use specific versions of packages leaving them not updated (not recomended) than use the command
npm install --legacy-peer-deps
Note: There are major changes on 15. My last project failed from 14 to 15 and had to roll it back to take time to make manuall changes also.