简体   繁体   中英

Fix the upstream dependency conflict in Angular

I know the answer to this question is already available on SOF but I can't use --legacy-peer-deps or --force on my production server that's why I want to learn the real reason behind why this error occurs and want to fix it.

On installing some libraries I am getting the following error, does anyone know how to resolve it without forcing it? I am working on Angular 14, If need be I can downgrade too.

在此处输入图像描述

在此处输入图像描述

The reason you get this error is because your dependency ngx-intl-tel-input@3.2.0 is depending on an @angular/common version between 8 - 13. But your app is on angular 14 with @angular/common@14.0.7 .

You have two options:

  1. If possible, upgrade ngx-intl-tel-input to a newer version, that makes use of @angular/common@14.xx

  2. Downgrade your app to angular 13.

Edit You've added a second image. Here it seems you are just missing @angular/animations . Try npm i @angular/animations

I had the same problem in angular 14, so I tried this library ngx-mat-intl-tel-input and it worked for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM