react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

“requireNativeComponent: "RNCSafeAreaProvider" was not found in the UIManager.”

Open mamadfar opened this issue 2 years ago • 3 comments

Hi guys. I have a big problem with this error. Everytime I use this package and wrap App.js code in "SafeAreaProvider" in react native cli, I get this error and app crashes: “requireNativeComponent: "RNCSafeAreaProvider" was not found in the UIManager.” these are all packages which I use: react: 17.0.2 react-native: 0.68.1 react-native-safe-area-context: ^4.2.5 node: 16.14.0 npm: 8.3.1 yarn: 1.22.18. Also, I want to use react navigation and react-native-elements, so I need "react-native-safe-area-context" and "SafeAreaProvider"

mamadfar avatar May 02 '22 12:05 mamadfar

see solution on this thread https://github.com/react-navigation/react-navigation/issues/8964

ddikodroid avatar Jun 06 '22 19:06 ddikodroid

@mamadfar, Were you able to resolve this issue? I'm facing the same after I upgraded react-native from 66 to 69. I tried linking the library manually as suggested on the react-navigation thread, but it didn't work; getting the error on both OS.

souvik-ghosh avatar Jul 18 '22 13:07 souvik-ghosh

@mamadfar, Were you able to resolve this issue? I'm facing the same after I upgraded react-native from 66 to 69. I tried linking the library manually as suggested on the react-navigation thread, but it didn't work; getting the error on both OS.

ya, I solved it. You just need to build again in bare react native app. Here my suggestion, everytime you're gonna add a package to your project, instead of start the app, just build again and clean your gradle then start the app. Your app will run perfectly.

mamadfar avatar Jul 18 '22 14:07 mamadfar

It looks like it does't work with react-native "react-native": "^0.70.5",, it doesn't export RNCSafeAreaProvider anymore in version 0.70 and above

kpietrzak-web avatar May 10 '23 21:05 kpietrzak-web