Skip to content

Property 'capacitor-google-map' does not exist on type 'JSX.IntrinsicElements' #84

Open

Description

@reggiesteppa

I am building an Ionic app using React. I import the google maps plugin fine, but when I try to add the google maps component I am getting a TypeScript error.

Property 'capacitor-google-map' does not exist on type 'JSX.IntrinsicElements'.ts(2339)

The plugin is installed and I was able to find the type definitions. What could the problem be?

Activity

  1. alexsorkin commented on Jun 9, 2025

    @alexsorkin

    Put in to your src/global.d.ts:

    declare module "react" {
      export namespace JSX {
        export interface IntrinsicElements {
          "capacitor-google-map": any;
        }
      }
    }
    export {};
    

    But.. this should be stated in Readme (React specific) as it does for Angular.
    So, I still consider it a bug.

    Also the css:

    capacitor-google-map {
      display: block;
      width: 100%;
      height: 100%;
      min-height: 100px;
    }
    

    Is mandatory. Without it, capacitor-google-map fails rendering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions