You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ng update wants to update @angular/material in project that does not have it installed #29627
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
19.1.6
Description
Running ng update offers update to @angular/material even though it is not installed to the project. The project has @angular/cdk and @angular/cdk-experimental installed.
We analyzed your package.json, there are some packages to update:
Name Version Command to update
---------------------------------------------------------------------------------
@angular/cli 19.1.6 -> 19.1.7 ng update @angular/cli
@angular/core 19.1.5 -> 19.1.6 ng update @angular/core
@angular/material 19.1.3 -> 19.1.4 ng update @angular/material
I think it should have @angular/cdk instead of material here.
For some reason, @angular/cdk-experimental is never listed in this list, even though you always need to update it same time as @angular/cdk.
changed the title [-]ng update wants to update @angular/material in project that does not have installed[/-][+]ng update wants to update @angular/material in project that does not have it installed[/+]on Feb 12, 2025
The package @angular/cdk-experimental is missing from the list. Technically, it should not be listed, similar to how packages like @angular/core and @angular/forms are not explicitly shown. This is because the update command targets a group of packages. However, in this case, @angular/cdk-experimental is not included in any group, which will cause the update to fail. PR here: build: add missing packageGroup fields and packages in package.json components#30486
Activity
[-]ng update wants to update @angular/material in project that does not have installed[/-][+]ng update wants to update @angular/material in project that does not have it installed[/+]fix(@angular/cli): prefer installed package as fallback when listing …
fix(@angular/cli): prefer installed package as fallback when listing …
alan-agius4 commentedon Feb 13, 2025
There are two issues here:
The logs display
@angular/materialinstead of@angular/cdk, likely due to the fallback behavior of the group names. I have a PR to address this here: fix(@angular/cli): prefer installed package as fallback when listing package groups #29629The package
@angular/cdk-experimentalis missing from the list. Technically, it should not be listed, similar to how packages like@angular/coreand@angular/formsare not explicitly shown. This is because the update command targets a group of packages. However, in this case,@angular/cdk-experimentalis not included in any group, which will cause the update to fail. PR here: build: add missingpackageGroupfields and packages inpackage.jsoncomponents#30486fix(@angular/cli): prefer installed package as fallback when listing …
fix(@angular/cli): prefer installed package as fallback when listing …
angular-automatic-lock-bot commentedon Mar 16, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.