Home > Enterprise >  What it means in ionic
What it means in ionic

Time:01-01

I am facing error as below when i try to execute ng add @angular/material in my ionic project. please let me know what it tries to say? what need to be changed. this

npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"~13.0.0" from the root project
npm ERR!   peer @angular/core@"^13.0.0 || ^14.0.0-0" from @angular/[email protected]
npm ERR!   node_modules/@angular/material
npm ERR!     @angular/material@"13.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"13.1.1" from @angular/[email protected]
npm ERR! node_modules/@angular/animations
npm ERR!   peer @angular/animations@"^13.0.0 || ^14.0.0-0" from @angular/[email protected]
npm ERR!   node_modules/@angular/material
npm ERR!     @angular/material@"13.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.```

CodePudding user response:

try to run npm install --legacy-peer-deps first

CodePudding user response:

Your project automatically use angular 13 version for each angular dependency. Ionic 5 use angular 12 version So You should use @angular/material version 12. Check Your ion-angular version from package.json then use same version angular material.

  • Related