Reputation: 581
I upgraded the library version of react-navigation
and its utility libraries. Now when running the application it gives me "RNCSafeAreaProvider was not found in the UIManager Error". How can I fix this ?
Upvotes: 1
Views: 9333
Reputation: 581
This error might come when you upgrade the version of react-navigation
library, it's dependencies and linked modules. As mentioned in the react-navigation doc , it is made up of some more core utilities.
The issue can be there because of,
As mentioned in the React Navigation documentation try installing the rest of the needed libraries.
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
You shouldn't be worrying about this step if you didn't have those utility libraries installed in the first place. Move forward to step 03 :)
Now if the React-Native app was working before updating the versions and not anymore, that could be because of incompatible react-navigation and other utility library versions. Easiest way to fix this is...
npm remove react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
then...
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
This should fix any incompatible version issues introduced during the upgrading process.
Since I tried this fix in an Android build environment...
cd android
android folder and type ./gradlew clean
npx react-native run-android
to build the app again.The "RNCSafeAreaProvider" was not found in the UIManager Error should be gone by now ;)
Upvotes: 4