Home > other >  How to resolve dependency issue - Angular14 flex-layout
How to resolve dependency issue - Angular14 flex-layout

Time:06-23

I am using Angular14 and tried to install Angular Flex layout.

I am getting this error: after running the command - ng add @angular/flex-layout

error Found: @angular/[email protected]
error node_modules/@angular/cdk
error   @angular/cdk@"^14.0.2" from the root project
error
error Could not resolve dependency:
error peer @angular/cdk@"^13.0.0" from @angular/[email protected]
error node_modules/@angular/flex-layout
error   @angular/flex-layout@"13.0.0-beta.38" from the root project

So, to use it, do I need to downgrade angular? or there is a workaround to this?

CodePudding user response:

Apparently it is still a work in progress: https://github.com/angular/flex-layout/issues/1404. The github issue claims flex-layout 13 is compatible with angular 14, so you could try to add/update your dependencies by adding the --force flag.

CodePudding user response:

You could also use --legacy-peer-deps

npm install --save --legacy-peer-deps @angular/flex-layout
  • Related