1

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.

enter image description here

enter image description here

Huzaifa
  • 121
  • 11

2 Answers2

0

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.x.x

  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

Riscie
  • 3,775
  • 1
  • 24
  • 31
  • Can you check the 2nd image I have attached and tell what version mat-timepicker requires? – Huzaifa Sep 21 '22 at 08:04
  • I downgraded my angular to 12 and it already had "@angular/animations": "~12.0.5", and the error remains but as I understand it requires angular/amination v14 which again won't work for the first case so I am kinda stuck again lol – Huzaifa Sep 21 '22 at 10:56
  • Can you add your package.json to your post? – Riscie Sep 22 '22 at 06:24
0

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

red1dev
  • 26
  • 6
  • can you share a bit more of how you used it? for me it creates an invisible box and the country dropdown in the left of the screen https://prnt.sc/RPAR-Cm308l2 – WhatsThePoint Mar 10 '23 at 14:53