1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Angular Google Maps (AGM) 実装後にTS2503: Cannot find namespace 'google'などのエラーが出る

Posted at

Angular Google Maps (AGM) 実装後にng s --oコマンドで起動時に表題のようなエラーが大量に出ました。

以下の手順で解消できます。
①下記コマンドを実行。

npm install @types/google-maps

②package.jsonに追加された"@types/googlemaps"プロパティの値を"3.39.12"に変更。
(3.39.12以外だとエラーが散見されるようです。またバージョン前に付与されている^も外す必要があります。)

【参考】
https://stackoverflow.com/questions/39909544/typescript-error-cannot-find-namespace-google
https://github.com/DefinitelyTyped/DefinitelyTyped/issues/48574

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?