I'm learning React Native. I'm trying to use SafeAreaProvider and SafeAreaView, but when I do this:
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
I get the message that the module "react-native-safe-area-context" cannot be found
This is my version:
"dependencies": { "@react-native-community/masked-view": "^0.1.11", "expo": "~48.0.18", "expo-status-bar": "~1.4.4", "react": "18.2.0", "react-native": "0.71.8", "react-native-safe-area-context": "4.5.0", "react-navigation": "^4.4.4"
Can you help me? Thank you so much!
I tried downgrading react-native-safe-area-context from 4.7.1 to 4.5
You received the error message "Module 'react-native-safe-area-context' not found" because the SafeAreaContext library is not installed in your environment.
This library is included with Expo Go, but if you are using NPM you should follow the instructions here.
Run the following command in your environment terminal to install the library locally:
If this command does not work, try using the following command: