Closed leonyhenn closed 5 years ago
OK, i have it figured out, this is actually my stupid mistake.
in MapboxClient.js I change
import MapboxClient from 'mapbox';
to
import MapboxClient from '@mapbox/react-native-mapbox-gl';
cause when compailer is complaining I thought this refers to local module and author right it this way only for convinient.
solution: change it back, then run
npm install mapbox
on your root directory
Now things works. I leave it here so if anyone else run into this error can see the solution.
Object is not a constructor (evaluating 'new _reactNativeMapboxGl.default(_config.default.get('accessToken'))')
So, following is what I did: 1.I copied all the code of src folder to root folder in order to directly run example
in to it
then when I run it on ios, and android it complains about following:
Object is not a constructor (evaluating 'new _reactNativeMapboxGl.default(_config.default.get('accessToken'))')
Not sure what is going on, and no one ever brought this on issues before. I check access token it is still in mapbox website