Skip to content

ng update wants to update @angular/material in project that does not have it installed #29627

Closed
@rubiesonthesky

Description

@rubiesonthesky

Command

update

Is this a regression?

  • 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.

Minimal Reproduction

ng update

Exception or Error


Your Environment

Angular CLI: 19.1.6
Node: 22.11.0
Package Manager: npm 11.0.0
OS: darwin arm64

Angular: 19.1.5
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1901.6
@angular-devkit/build-angular   19.1.6
@angular-devkit/core            19.1.6
@angular-devkit/schematics      19.1.6
@angular/cdk                    19.1.3
@angular/cdk-experimental       19.1.3
@angular/cli                    19.1.6
@schematics/angular             19.1.6
rxjs                            7.8.1
typescript                      5.7.3
zone.js                         0.15.0

Anything else relevant?

I'm not sure if this should have been reported here or in the components repository.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions