Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to upgrade to Angular 11 gives incompatible peer dependency errors #1938

Open
michelle-arzul opened this issue Apr 1, 2021 · 11 comments

Comments

@michelle-arzul
Copy link

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 #1932 but with ng (yarn) instead of npm?

@sergey-morenets
Copy link

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

@yohny
Copy link

yohny commented Apr 7, 2021

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

@sergey-morenets
Copy link

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

@aravindSRM-India
Copy link

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

@stale
Copy link

stale bot commented Aug 21, 2021

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 stale bot added the stale label Aug 21, 2021
@EmilienRamos
Copy link

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

@stale stale bot removed the stale label Oct 18, 2021
@wil92
Copy link

wil92 commented Jan 4, 2022

same issue with angular 13

@ishanjaidka
Copy link

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

@sergey-morenets
Copy link

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

@bveronag
Copy link

bveronag commented Apr 7, 2022

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

Thanks for the advice! I'll try it

@dalel-loussaief
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants