How do you know what package version you need in angular?
Asked Answered
M

2

8

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?

Monody answered 31/5, 2021 at 16:37 Comment(3)
Before 12 it was numbered quite differently: github.com/textbook/salary-stats/commit/…. In general you can ng new up an app with the relevant CLI version and just have a look. Note to help other people with similar problems find this it would be helpful to include the actual error messages in the questionGreeson
I did. its - No matching version found for @angular-devkit/build-angular@xx where xx is whatever you try - eg 11 / 11.2 / 11.0 etcMonody
For that one, yes, but there are two other "fail"s without.Greeson
U
3

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.

Ultracentrifuge answered 31/5, 2021 at 16:53 Comment(2)
To add to this a little, in the Current Tags section, they have the appropriate version according to each version of Angular, e.g. 0.1102.15 -> v11-lts (for Angular 11)Circumscribe
@daddywoodland THANK YOU! I wasted so much time looking for this exact page. This is the exact link that takes you to the versions tabVicinal
S
5

On the right side of the site

https://www.npmjs.com/package/@angular-devkit/build-angular

It has the TAG referring to the angular version

Example:

12.2.17--------81.826------v12-lts

0.1102.19------36.756------v11-lts

Substitute answered 24/4, 2022 at 0:31 Comment(0)
U
3

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.

Ultracentrifuge answered 31/5, 2021 at 16:53 Comment(2)
To add to this a little, in the Current Tags section, they have the appropriate version according to each version of Angular, e.g. 0.1102.15 -> v11-lts (for Angular 11)Circumscribe
@daddywoodland THANK YOU! I wasted so much time looking for this exact page. This is the exact link that takes you to the versions tabVicinal

© 2022 - 2024 — McMap. All rights reserved.