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

Upgrade to Angular v12? #1956

Open
darkoandreev opened this issue May 17, 2021 · 14 comments
Open

Upgrade to Angular v12? #1956

darkoandreev opened this issue May 17, 2021 · 14 comments
Labels

Comments

@darkoandreev
Copy link

Hello everyone,
Do you have any plans to upgrade the @agm/core library to Angular v12? I'm using it in my personal project and I can't upgrade right now because it has an incompatible peer dependencies.
image

@darkoandreev darkoandreev changed the title Angular v12 error Upgrade to Angular v12? May 17, 2021
@kinggolf
Copy link

kinggolf commented Jun 3, 2021

@vredka Hi.
I just ran npm install --save @agm/core agm-direction --force successfully on my project.
Some details:
angular 12.0.3
node 14.15.1
npm 7.15.0

@timdoes
Copy link

timdoes commented Jun 3, 2021

@kinggolf you don’t get any errors when running the build command?

I have the same specs, except node v14.17, and it installs successfully with —force but then errors out when I try running the build command.

@kinggolf
Copy link

kinggolf commented Jun 3, 2021

No. Just warnings like:

npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @angular/common@12.0.3
npm WARN node_modules/@angular/common
npm WARN   peer @angular/common@"12.0.3" from @angular/forms@12.0.3
npm WARN   node_modules/@angular/forms
npm WARN     peer @angular/forms@">=8.2.7" from @ionic/angular@5.6.8
npm WARN     node_modules/@ionic/angular
npm WARN     1 more (the root project)
npm WARN   4 more (@angular/platform-browser, ...)
npm WARN 
npm WARN Could not resolve dependency:
npm WARN peer @angular/common@"^9.1.0 || ^10.0.0" from @agm/core@3.0.0-beta.0
npm WARN node_modules/@agm/core
npm WARN   @agm/core@"*" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: @angular/core@12.0.3
npm WARN node_modules/@angular/core
npm WARN   peer @angular/core@"12.0.3" from @angular/animations@12.0.3
npm WARN   node_modules/@angular/animations
npm WARN     peerOptional @angular/animations@"12.0.3" from @angular/platform-browser@12.0.3
npm WARN     node_modules/@angular/platform-browser
npm WARN     1 more (the root project)
npm WARN   7 more (@angular/common, @angular/forms, ...)

@kinggolf
Copy link

kinggolf commented Jun 3, 2021

Sorry, just re-read your messages. Yes I get same error when trying to build.

@kinggolf
Copy link

kinggolf commented Jun 3, 2021

I wonder is this due to strict mode.

@mirzasetiyono
Copy link

so agm is not working in angular 12?

@darkoandreev
Copy link
Author

darkoandreev commented Jun 7, 2021

Instead of waiting and asking for upgrade, you should start using @angular/google-maps library provided by the Angular team. Support is very good, community is very big and migration from this library to Angular wrapper library is very easy.

https://github.com/angular/components/tree/master/src/google-maps#readme

@Shobhit-TheSkywalker
Copy link

Shobhit-TheSkywalker commented Jul 7, 2021

Hi AGM team,

Is there any development upon the compatibility issue with angular v12 ?
or
@SebastianM : Is their any workaround to make it work with angularv12 as I am upgrading my production application to angular v12 from v11, so it will be tuff to migrate to another library like @angular/google-maps. So, team need your help with the workaround to migrate successfully to angular v12.

@john8329
Copy link

john8329 commented Aug 9, 2021

Also having trouble with this library, it still references invalid types even after installing @types/googlemaps and doesn't seem tested in recent versions of Angular. Will try with @angular/google-maps.

@tapestephan
Copy link

Had the same error on my Angular 12 project but it worked after downgrading @types/googlemaps.

"dependencies": {
    "@agm/core": "^3.0.0-beta.0",
},
"devDependencies": {
    "@types/googlemaps": "^3.39.12",
}

@lynxeyedua
Copy link

lynxeyedua commented Sep 29, 2021

@tapestephan
For me worked exact version:

"devDependencies": {
    "@types/googlemaps": "3.39.12",
}

@massic80
Copy link

massic80 commented Oct 13, 2021

My 50 cent: @types/googlemaps is moving to @types/google.maps, not @types/google-maps (#1989)

@ezagdir
Copy link

ezagdir commented Oct 22, 2021

Another 50 cent about BOTH steps required for success. And thanks to @massic80 for the correct package name.

  1. npm i --save-dev @types/google.maps
  2. ADD! to types in tsconfig.app.json
    OR remove the empty types from tsconfig.app.json AND add to the parent tsconfig.json
{
  "compilerOptions": {
    "types": [
      "google.maps"
    ]
  }
}

@stale
Copy link

stale bot commented Apr 16, 2022

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.

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

No branches or pull requests

10 participants