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

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).

Open argelj289 opened this issue 6 years ago • 29 comments

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]>;

argelj289 avatar Oct 06 '20 08:10 argelj289

Same error, Angular V9, fresh install

riccardomassa avatar Oct 06 '20 08:10 riccardomassa

Hello,

What is your AGM version ?

Foreverdie avatar Oct 06 '20 09:10 Foreverdie

Just downloaded, @agm/[email protected] from package.json

Da: Pierre Steiniermailto:[email protected]

Hello,

What is your AGM version ?

riccardomassa avatar Oct 06 '20 09:10 riccardomassa

Yep, i've got the same error since i updated @types/googlemaps...

Foreverdie avatar Oct 06 '20 09:10 Foreverdie

You can rollback to v3.39.13 of @type/googlemaps (npm i @types/[email protected])

Foreverdie avatar Oct 06 '20 10:10 Foreverdie

Yes, installing @types/[email protected] solved the issue.

riccardomassa avatar Oct 06 '20 10:10 riccardomassa

it worked thanks

ghost avatar Oct 06 '20 14:10 ghost

For me it was also @googlemaps/markerclustererplus that got an update

jimmykane avatar Oct 07 '20 17:10 jimmykane

Yep, same issue here - seems like rollback of @type/googlemaps fixes this.

You can rollback to v3.39.13 of @type/googlemaps (npm i @types/[email protected])

tarlepp avatar Oct 08 '20 05:10 tarlepp

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]>;

install

npm install @types/[email protected] --save-dev

kalpeshrajpurohit avatar Jan 22 '21 07:01 kalpeshrajpurohit

Is it any plan to update this type to the latest version of @types/googlemaps?

diegoazh avatar Jan 26 '21 20:01 diegoazh

Error: node_modules/@agm/core/lib/services/google-maps-api-wrapper.d.ts:51:41 - error TS2314: Generic type 'MapHandlerMap' requires 1 type argument(s).

51 subscribeToMapEvent(eventName: N): Observable<google.maps.MapHandlerMap[N]>;
~~~~~~~~~~~~~~~~~~~~~~~~~

Naga121 avatar Feb 18 '21 07:02 Naga121

You can rollback to v3.39.13 of @type/googlemaps (npm i @types/[email protected])

thank you so much. it is working for me.<3

guri1497 avatar Mar 04 '21 21:03 guri1497

@guri1497 for me, too, it solved the problem😊

EfratIfergan avatar Mar 08 '21 23:03 EfratIfergan

I have the same issue, but a weird one, the normal build working fine for me with ng build --prod but when I build my Docker image then I have this issue!

BTW:

"@types/googlemaps": "3.39.12",
"@agm/core": "^3.0.0-beta.0",
"@angular/core": "~10.1.1",

Any similar behavior?

hamzahsn avatar Apr 16 '21 03:04 hamzahsn

@hamzahsn you need to change the "@types/googlemaps": "3.39.12", to "@types/[email protected]"

EfratIfergan avatar Apr 16 '21 12:04 EfratIfergan

@EfratIfergan I have tried them both actually but did not work

hamzahsn avatar Apr 16 '21 16:04 hamzahsn

You can rollback to v3.39.13 of @type/googlemaps (npm i @types/[email protected])

this worked for me

shamsi2u avatar May 01 '21 19:05 shamsi2u

I am also getting the same error. I am trying to upgrade the @types/googlemaps version from 3.39.13 to 3.43.3. My agm version is "@agm/core": "^3.0.0-beta.0". Is there anybody who can help me? Thanks

yisalk avatar May 20 '21 11:05 yisalk

It really worked for me too thanks Developers : npm i @types/[email protected]

Avinash-NOCPL avatar Jun 15 '21 05:06 Avinash-NOCPL