My current project is built on Angular version 13, and I've been tasked with upgrading it to version 16.
After researching on Stack Overflow and checking the official documentation, I learned that the recommended upgrade path is to go from 13 -> 14 first.
However, when following the instructions provided in the docs, I encountered a recurring error every time I tried to run the project:
The CLI version installed only supports Angular versions ^13.0.0 || ^13.3.0-rc.0,
while the project is on Angular version 14.3.0.
To resolve this issue, please refer to the following link for guidance on updating Angular:
https://update.angular.io/
Per the documentation, I ran the command
ng update @angular/core@14 @angular/cli@14
and globally installed Angular CLI version 14 as instructed.
Upon running npm run ng version
, here's the output I received:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 14.2.10
Node: 18.16.1 (Unsupported)
Package Manager: npm 10.8.2
OS: win32 x64
Angular: 14.3.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.11
@angular-devkit/build-angular 13.3.11
@angular-devkit/core 13.3.11
@angular-devkit/schematics 14.2.10
@angular/cdk 13.3.9
@angular/material 13.3.9
@nguniversal/express-engine 13.1.1
@schematics/angular 14.2.10
rxjs 7.8.1
typescript 4.6.3