Why it says : Property 'getCurrentPosition' does not exist on type 'typeof Geolocation'.?

In runtime for the following code, it says :


Property ‘getCurrentPosition’ does not exist on type ‘typeof Geolocation’.

private getCurrentPosition(maximumAge: number = 10000): Promise<Coordinates> {
    const options = {
      timeout: 10000,
      enableHighAccuracy: true,
    return Geolocation.getCurrentPosition(options).then((pos: Geoposition) => {
      return pos.coords;

is there a plugin you are using for Geolocation?

I installed it. it was working fine in other pages.

Same code in the other projects has working like charm.

do you have to do an include?

@sdetweil Yes , I already did. but nothing changed.