I'm trying to import the expo-location in my react-native app with expo.
I installed the library with this command:
npx expo install expo-location
And importing it:
import * as Location from 'expo-location'
but as soon as I add the import, the app breaks with the following error:
Error: Cannot find native module 'ExpoLocation', js engine: hermes [Component Stack]
My app.json file has
"plugins": [
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow this app to use your location."
}
],
I'm trying to import the expo-location in my react-native app with expo.
I installed the library with this command:
npx expo install expo-location
And importing it:
import * as Location from 'expo-location'
but as soon as I add the import, the app breaks with the following error:
Error: Cannot find native module 'ExpoLocation', js engine: hermes [Component Stack]
My app.json file has
"plugins": [
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow this app to use your location."
}
],
Share
Improve this question
asked Nov 22, 2024 at 10:19
doobeandoobean
2,1385 gold badges22 silver badges32 bronze badges
1
- Did you find a solution to this? I'm seeing the same problem. – NorseGaud Commented Nov 24, 2024 at 15:17
1 Answer
Reset to default 0you need to rebuild the project
eas build --profile development --platform android
more info here: https://docs.expo.dev/develop/development-builds/create-a-build/