Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update an Angular library project?

Tags:

angular

I have an Angular library which is generated using Angular 11 version. Now I want to update it to Angular 12 but no luck using ng update command.
I have used the below command.

ng update --project my-lib

The above library is published in npm. Now I want to update it to the latest version.

like image 211
SaiSurya Avatar asked Feb 15 '26 05:02

SaiSurya


2 Answers

According to this issue, you need to update the peerDependencies of your library yourself, so according to that info, I think it's normal that ng update doesn't update the library's package.json.

like image 155
Stephanie Avatar answered Feb 16 '26 19:02

Stephanie


change version in dist/package.json run command ng version 0.0.2 run command

like image 36
Geetha Priya.S Avatar answered Feb 16 '26 17:02

Geetha Priya.S