ng build λλ 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]>;
λμΌν μ€λ₯, Angular V9, μλ‘ μ€μΉ
μλ νμΈμ,
κ·νμ AGM λ²μ μ 무μμ λκΉ?
λ°©κΈ λ€μ΄λ‘λ, package.jsonμμ @ agm /[email protected]
Da: νΌμλ₯΄ μνμ΄λμ μλ¦Ό @github.com
μλ νμΈμ,
κ·νμ AGM λ²μ μ 무μμ λκΉ?
μ, @types/googlemapsλ₯Ό μ λ°μ΄νΈν μ΄νλ‘ λμΌν μ€λ₯κ° λ°μνμ΅λλ€...
@type/googlemaps(npm i @types/[email protected])μ v3.39.13μΌλ‘ λ‘€λ°±ν μ μμ΅λλ€.
μ, @types/ [email protected] μ μ€μΉνλ©΄ λ¬Έμ κ° ν΄κ²°λμμ΅λλ€.
κ°μ¬ν©λλ€
λλ₯Ό μν΄ μ
λ°μ΄νΈλ₯Ό λ°μ κ²μ @googlemaps/markerclustererplus
μ΄κΈ°λ νμ΅λλ€.
μ, μ¬κΈ°μμ λμΌν λ¬Έμ κ° λ°μν©λλ€. @type/googlemaps
λ‘€λ°±μΌλ‘ μ΄ λ¬Έμ κ° ν΄κ²°λ κ² κ°μ΅λλ€.
@type/googlemaps(npm i @types/[email protected])μ v3.39.13μΌλ‘ λ‘€λ°±ν μ μμ΅λλ€.
ng build λλ 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]>;
μ€μΉνλ€
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ν~ ~ ~ ~ _
@type/googlemaps(npm i @types/[email protected])μ v3.39.13μΌλ‘ λ‘€λ°±ν μ μμ΅λλ€.
λ§€μ° κ°μ¬ν©λλ€. κ·Έκ²μ λλ₯Ό μν΄ μΌνκ³ μμ΅λλ€.<3
@guri1497 μ λ μ ν΄κ²°νμ΅λλ€π
λλ κ°μ λ¬Έμ κ° μμ§λ§ μ΄μν λ¬Έμ κ° μμ΅λλ€. ng build --prodλ₯Ό μ¬μ©νλ©΄ μ μ λΉλκ° μ λλ‘ μλνμ§λ§ Docker μ΄λ―Έμ§λ₯Ό λΉλν λ μ΄ λ¬Έμ κ° λ°μν©λλ€!
BTW:
"@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(npm i @types/[email protected])μ v3.39.13μΌλ‘ λ‘€λ°±ν μ μμ΅λλ€.
μ΄κ²μ λλ₯Ό μν΄ μΌνμ΅λλ€
κ°μ₯ μ μ©ν λκΈ
@type/googlemaps(npm i @types/[email protected])μ v3.39.13μΌλ‘ λ‘€λ°±ν μ μμ΅λλ€.