Diamoniner12345
Diamoniner12345

Reputation: 330

An unhandled exception occurred: Collection "@angular/material" cannot be resolved

I am trying to run this schematic for my angular project:

ng generate @angular/material:material-table --name data-table 

However, running it in the terminal for vs code gives an error

An unhandled exception occurred: Collection "@angular/material" cannot be resolved.

Could someone please tell me how I would get rid of this error so that I can generate my required schematic in my angular project?

Upvotes: 1

Views: 1602

Answers (1)

Mohamed Karkotly
Mohamed Karkotly

Reputation: 1517

It looks like your Angular Material is broken, try reinstalling using the command

ng add @angular/material

Upvotes: 3

Related Questions