codediodeio / geofirex

:globe_with_meridians: :round_pushpin: Geolocation Queries with Firestore & RxJS
https://geo-test-c92e4.firebaseapp.com/
477 stars 107 forks source link

'geofirex' does not contain a default export in react #167

Closed bhagwanbankar closed 3 years ago

bhagwanbankar commented 3 years ago

when I am importing geofirex in MySample.js file in react project import geofirex from 'geofirex';. I am getting below error at compile time Attempted import error: 'geofirex' does not contain a default export (imported as 'geofirex').

Dependencies:
"firebase": "^7.21.1", "geofirex": "^0.1.0", "ngeohash": "^0.6.3", "react": "^16.13.1", "react-dom": "^16.13.1", "react-scripts": "3.4.3", "rxjs": "^6.6.3",

Thanks

tobzilla90 commented 3 years ago

@bhagwanbankar

you can import the init function like this:

import { init } from 'geofirex'; const geo = init(firebase);

bhagwanbankar commented 3 years ago

@tobzilla90 It worked for me. Thanks.