Search code examples
angularnpmangular11

How do you know what package version you need in angular?


I had an asp.net core app on Angular 10.2.4, decided to upgrade to 11. Ran: ng update @angular/core@11 @angular/cli@11 it failed complaining of devkit. Uninstalled devkit, upgraded angular to 11.2.14 OK.

Now am trying to install devkit back.

  • npm install @angular-devkit/build-angular --save-dev - fail - seems try to install v12 and depends on cli 12 also.

  • npm install @angular-devkit/[email protected] --save-dev or npm install @angular-devkit/build-angular@11 --save-dev - fail - No matching version found for @angular-devkit/build-angular@xx

What's the right version of devkit for Angular 11? What's the general idea on how to find/infer/guess correct version of a package for a certain Angular version?


Solution

  • I go here (https://www.npmjs.com/package/@angular-devkit/build-angular) and I click on the versions tab. It seems with version 12 they have become semantic (meaning 12.0.2 matches with Angular 12) but for you I think you need version 0.1102.13. You can check out all the versions on that site.