Reputation: 51
Getting this error when trying to use react mapbox geocoder in my react project.
I deleted FlyToInterpolator but still getting the same error.
Anybody has a solution?
I installed
import MapGL from "react-map-gl"; import Geocoder from "react-map-gl-geocoder";
./node_modules/react-map-gl-geocoder/dist/index.m.js Attempted import error: 'FlyToInterpolator' is not exported from 'react-map-gl' (imported as 'r').
these are my dependencies:
"mapbox": "^1.0.0-beta10",
"mapbox-gl": "^2.7.0",
"mapbox-gl-geocoder": "^2.0.1",
"prop-types": "^15.8.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-icons": "^4.3.1",
"react-map-gl": "^7.0.9",
"react-map-gl-geocoder": "^2.2.0",
"react-mapbox-gl-geocoder": "^1.1.0",
"react-scripts": "4.0.3",
"reactstrap": "^9.0.1",
Upvotes: 1
Views: 2591
Reputation: 441
You can use @mapbox/mapbox-gl-geocoder instead: https://github.com/mapbox/mapbox-gl-geocoder
Just replace the import:
import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder';
Upvotes: 1
Reputation: 71
react-map-gl-geocoder doesn't work with latest react-map-gl version as you can see here https://github.com/SamSamskies/react-map-gl-geocoder/issues/132
Upvotes: 1