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]>;
同じエラー、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
51 subscribeToMapEvent〜〜〜〜〜 _ _ _ _
@ 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)
これは私のために働いた
最も参考になるコメント
@ type / googlemapsのv3.39.13にロールバックできます(npm i @ types / googlemaps @ 3.39.13)