angular-google-maps icon indicating copy to clipboard operation
angular-google-maps copied to clipboard

Trying to upgrade to Angular 11 gives incompatible peer dependency errors

Open michelle-arzul opened this issue 4 years ago • 11 comments

Issue description

Project is on Angular 10. Trying to upgrade to Angular 11, but getting incompatible peer dependency errors from agm. They don't seem to be resolved by upgrading agm to 1.1.0.

Steps to reproduce and a minimal demo of the problem

$ ng update @angular/core @angular/cli [...] Package "@agm/core" has an incompatible peer dependency to "@angular/common" (requires "^6.0.0 || ^7.0.0 || ^8.0.0" (extended), would install "11.2.7"). Package "@agm/core" has an incompatible peer dependency to "@angular/core" (requires "^6.0.0 || ^7.0.0 || ^8.0.0" (extended), would install "11.2.7"). [...]

angular-google-maps, Angular, & any other relevant dependency versions

Angular: 10.2.1 agm: 1.0.0

Possible duplicate of https://github.com/SebastianM/angular-google-maps/issues/1932 but with ng (yarn) instead of npm?

michelle-arzul avatar Apr 01 '21 10:04 michelle-arzul

Hi @michelle-arzul

It seems that this project is not maintained any more. That's why it has out-dated Angular version requirements (not greater than 8.0).

But you can always skip all these version checks:

ng update @angular/cli @angular/core --force

sergey-morenets avatar Apr 05 '21 18:04 sergey-morenets

the latest version 3.0.0-beta.0 work fine with angular 11

yohny avatar Apr 07 '21 11:04 yohny

the latest version 3.0.0-beta.0 work fine with angular 11

Yes, it works without issues but it contains outdated requirement about Angular version (version <=8) and that aborts migration using ng update

sergey-morenets avatar Apr 07 '21 18:04 sergey-morenets

Any solution found.

$ npm install @agm/core npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! @angular/common@"~11.2.11" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^9.1.0 || ^10.0.0" from @agm/[email protected] npm ERR! node_modules/@agm/core npm ERR! @agm/core@"*" 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. npm ERR! npm ERR! See /home/aravind/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! /home/aravind/.npm/_logs/2021-04-30T11_22_57_346Z-debug.log

aravindSRM-India avatar Apr 30 '21 11:04 aravindSRM-India

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 21 '21 04:08 stale[bot]

Actually same issue with Angular 12 :

npm install @agm/core

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~12.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^9.1.0 || ^10.0.0" from @agm/[email protected]
npm ERR! node_modules/@agm/core
npm ERR!   @agm/core@"*" 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.
npm ERR! 
npm ERR! /.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! .npm/_logs/2021-10-18T15_19_36_748Z-debug.log

EmilienRamos avatar Oct 18 '21 15:10 EmilienRamos

same issue with angular 13

wil92 avatar Jan 04 '22 12:01 wil92

  • Install this package with --legacy-peer-deps flag

ishanjaidka avatar Jan 30 '22 23:01 ishanjaidka

My advice is to migrate to Angular Material Google Map which offers similar functionality

sergey-morenets avatar Jan 31 '22 07:01 sergey-morenets

My advice is to migrate to Angular Material Google Map which offers similar functionality

Thanks for the advice! I'll try it

bveronag avatar Apr 07 '22 06:04 bveronag

npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @agm/[email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! @angular/common@"11.2.14" from the root project npm ERR! peer @angular/common@"^11.0.0 || ^12.0.0-0" from @angular/[email protected] npm ERR! node_modules/@angular/cdk npm ERR! @angular/cdk@"11.0.0" from the root project npm ERR! peer @angular/cdk@"11.0.0" from @angular/[email protected] npm ERR! node_modules/@angular/material npm ERR! @angular/material@"11.0.0" from the root project npm ERR! 1 more (@angular/material-moment-adapter) npm ERR! 15 more (@angular/flex-layout, @angular/forms, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^6.0.0 || ^7.0.0 || ^8.0.0" from @agm/[email protected] npm ERR! node_modules/@agm/core npm ERR! @agm/core@"1.1.0" from the root project npm ERR! npm ERR! Conflicting peer dependency: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! peer @angular/common@"^6.0.0 || ^7.0.0 || ^8.0.0" from @agm/[email protected] npm ERR! node_modules/@agm/core npm ERR! @agm/core@"1.1.0" 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. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\LENOVO\AppData\Local\npm-cache_logs\2023-01-22T13_36_01_233Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\LENOVO\AppData\Local\npm-cache_logs\2023-01-22T13_36_01_233Z-debug-0.log

dalel-loussaief avatar Jan 22 '23 13:01 dalel-loussaief