Search code examples
angularagm

AgmCoreModule.forRoot returns a ModuleWithProviders type without a generic type argument Angular 14


I have upgraded to Angular 14 and I am getting the following error:

Error in turbo_modules/@agm/[email protected]/core.module.d.ts (29:79)

AgmCoreModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors. AgmCoreModule.forRoot returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.

Here is Link : https://stackblitz.com/edit/angular-ivy-slqupb?file=src/app/app.module.ts


Solution

  • It is resolved by:

    • As per @cfprabhu's comment i have updated @agm/core 3.0.0-beta.0 and
    • Installed plugin @types/googlemaps 3.43.3

    Here is working demo: https://stackblitz.com/edit/angular-ivy-slqupb?file=src/app/app.module.ts