1

I cannot update my angular version from 11.2.14 to 12.x.x When I'm trying to run "ng update @angular/core@12 @angular/cli@12" I got this:

The installed local Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
✔ Package successfully installed.
Node.js version v12.19.0 detected.
The Angular CLI requires a minimum Node.js version of either v12.20, v14.15, or v16.10.

Please update your Node.js version or visit https://nodejs.org/ for additional instructions.

Regarding this documentation https://gist.github.com/LayZeeDK/c822cc812f75bb07b7c55d07ba2719b3 my nodejs version is compatibility with Angular 12.x

I also tried to install angular/cli@12 manually and gets the same message.

ng --version

Angular CLI: 12.2.13
Node: 12.19.0
Package Manager: npm 6.14.8
OS: linux x64

Angular: 11.2.14
... animations, common, compiler, compiler-cli, core, elements
... forms, platform-browser, platform-browser-dynamic, router
... upgrade

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.14
@angular-devkit/build-angular   0.1102.14
@angular-devkit/core            11.2.14
@angular-devkit/schematics      12.2.13
@angular/cli                    12.2.13
@schematics/angular             12.2.13
rxjs                            6.6.7
typescript                      4.1.6

ps I cannot update node version of the infrastructure reason.

rysalka
  • 51
  • 1
  • 7

1 Answers1

1

I found the workaround:
First I updated my nodejs to 12.20 and next I was able to update Angular.
After update Angular I did downgrade back node.js version to 12.19 and tried to build project.
Everything looks good.

I guess problem was related to Angular tool for upgrade version.

rysalka
  • 51
  • 1
  • 7
  • 1
    otherwise, you can use nvm to manage multiple node versions https://stackoverflow.com/questions/25654234/node-version-manager-nvm-on-windows – Gopal Nov 20 '21 at 05:29