Install Angular Material Error Package install failed, see above

Viewed 935

I tried to Install Angular Material using ng add @angular/material but I get those errors I am up to date with my angular cli The error

1 Answers

You need to install the right version of angular material for your version of angular. You are trying to install Angular material v13, so you probably have some Angular version lower than 13.

For example if your Angular is v12:

npm install @angular/material@12.2.13

Or update your angular application to 13 following the Official Update Guide and then install angular material.

If you read the error, it is telling you that it can't find certain packages, for example @angular/core@13. So if you check your package.json, you will find that your @angular/core does not match what the installation is looking for.

Another option is to force the installation, and then update your angular application. Whichever way you go, the versions need to match.

Related