angular-google-maps: ERROR in node_modules/@agm/core/lib/services/google-maps-api-wrapper.d.ts:51:41 - error TS2314: Generic type 'MapHandlerMap' requires 1 type argument(s).
I encountered error in my terminal when I execute ng build or ng serve:
ERROR in node_modules/@agm/core/lib/services/google-maps-api-wrapper.d.ts:51:41 - error TS2314: Generic type 'MapHandlerMap<T>' requires 1 type argument(s).
51 subscribeToMapEvent<N extends keyof google.maps.MapHandlerMap>(eventName: N): Observable<google.maps.MapHandlerMap[N]>;
~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@agm/core/lib/services/google-maps-api-wrapper.d.ts:51:94 - error TS2314: Generic type 'MapHandlerMap<T>' requires 1 type argument(s).
51 subscribeToMapEvent<N extends keyof google.maps.MapHandlerMap>(eventName: N): Observable<google.maps.MapHandlerMap[N]>;
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 29
You can rollback to v3.39.13 of @type/googlemaps (npm i @types/googlemaps@3.39.13)
install
npm install @types/googlemaps@3.39.12 --save-dev
Yes, installing @types/googlemaps@3.39.13 solved the issue.
Yep, same issue here - seems like rollback of
@type/googlemaps
fixes this.@hamzahsn you need to change the “@types/googlemaps”: “3.39.12”, to “@types/googlemaps@3.39.13”
thank you so much. it is working for me.❤️
Had the same issue like you guys. Here is what I did and I am able to move forward now
cleared npm cache
Added the below versions through npm “@types/googlemaps”: “3.39.13”, “@agm/core”: “^3.0.0-beta.0”,
updated tsconfig file with the addition of “googlemaps” in the types array “types”: [ “googlemaps” ]
imported the agm module and updated the imports array with google api key in my module file AgmCoreModule.forRoot({ apiKey: “Add your google api key” libraries: [‘places’] })
Somehow the project came back to work well without issues in the terminal. I’m gonna try use the components now and let you know if I face any issues. Thanks a lot 4 your help