'geofirex' does not contain a default export in react
bhagwanbankar opened this issue · comments
bhagwanbankar commented
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
Tobias Vielhaber commented
you can import the init function like this:
import { init } from 'geofirex';
const geo = init(firebase);
bhagwanbankar commented
@tobzilla90
It worked for me.
Thanks.