geolocation-marker icon indicating copy to clipboard operation
geolocation-marker copied to clipboard

import returns empty object `{}` (Ionic 3)

Open RaschidJFR opened this issue 7 years ago • 2 comments

I'm using Ionic3 to build a PWA. I installed the package (npm install geolocation-marker) and Im importing it into my view:

import GeolocationMarker from 'geolocation-marker';

But the returned object is just empty {}:

console.log("glm: %o", GeolocationMarker);    //<- It ouputs just "glm: {}" to the console

RaschidJFR avatar Jun 18 '18 14:06 RaschidJFR

I can confirm that importing version 2.0.5 imports an empty object and you get an error trying to instantiate GeolocationMarker (it says that is has no constructor). Version 2.0.4, with the same exact usage, works as expected and returns an object containing GeolocationMarker in it (which is also a bit odd, honestly). Our code on v2.0.4 looks like this when instantiating:

import GeolocationMarker from 'geolocation-marker';

const geoMarker = new GeolocationMarker.GeolocationMarker();

@ChadKillingsworth any idea why this is happening?

For me personally, upgrading to v2.0.5 is not a huge concern, but my OCD kicks in and VSCode is telling me that there is a new version so I want to upgrade :) It would, however, help people who haven't been using the library as long as we have (over 3 years) that it works as expected and outlined in the docs.

reintroducing avatar Dec 10 '18 19:12 reintroducing

just wanted to follow up on this @ChadKillingsworth and see if you were able to take a look at it at all?

reintroducing avatar Jan 09 '19 14:01 reintroducing