Angular-google-maps: node_modules/@agm/core/lib/services/google-maps-api-wrapper.d.ts:51:41のエラー-エラーTS2314:ジェネリック型 'MapHandlerMap<t>'には1つの型引数が必要です。</t>

作成日 2020年10月06日  ·  18コメント  ·  ソース: SebastianM/angular-google-maps

ngbuildまたはngserveを実行すると、ターミナルでエラーが発生しました。

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

最も参考になるコメント

@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)

全てのコメント18件

同じエラー、Angular V9、新規インストール

こんにちは、

あなたのAGMバージョンは何ですか?

package.jsonから@agm / core @ 3.0.0-beta.0をダウンロードしました

Da:Pierre [email protected]

こんにちは、

あなたのAGMバージョンは何ですか?

はい、@ types / googlemapsを更新してから、同じエラーが発生しました...

@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)

はい、@ types /[email protected]をインストールすると問題が解決しました。

おかげでうまくいきました

私にとっては、更新されたのも@googlemaps/markerclustererplus

はい、ここでも同じ問題があります- @type/googlemapsのロールバックでこれが修正されたようです。

@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)

ngbuildまたはngserveを実行すると、ターミナルでエラーが発生しました。

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

インストール

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

このタイプを最新バージョンの@types/googlemapsに更新する予定はありますか?

エラー:node_modules / @ agm / core / lib / services / google-maps-api-wrapper.d.ts:51:41-エラーTS2314:ジェネリック型 'MapHandlerMap'には1つの型引数が必要です。

51 subscribeToMapEvent(eventName:N):監視可能 〜〜〜〜〜 _ _ _ _

@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)

どうもありがとうございます。 それは私のために働いています。<3

@ guri1497私にとっても、問題は解決しました😊

同じ問題がありますが、奇妙な問題です。通常のビルドはng build --prodで正常に機能しますが、Dockerイメージをビルドすると、この問題が発生します。

ところで:

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

同様の動作はありますか?

@hamzahsn 「@types / googlemaps 」:「3.39.12」を「@ types /[email protected]」に変更する必要があります

@EfratIfergan私は実際に両方を試しましたが、機能しませんでした

@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)

これは私のために働いた

このページは役に立ちましたか?
0 / 5 - 0 評価