I would like to know why this error “Invariant Violation: requireNativeComponent: “RNCSafeAreaProvider” was not found in the UIManager.” appears when I launch the development of my app with the dev client ( npx expo start --dev-client). the app works fine on Expo Go with the npx expo start command.
Thank you for your reply
react-native-safe-area-context is install but the error still shows, the problem is as i said only shows in dev client not in expo go
Then do you have an android directory or an ios directory in your app?
If so, you probably ran npx expo prebuild or npx expo run:android or npx expo run:ios at some point. Those commands cause the native android / ios projects to be generated which basically switches you to the Bare workflow.
If the app works correctly in Expo Go, you don’t need the android and ios directories and should remove them, as long as you have not made any changes in them that you still want.
Secondly, whether or not you had the above mentioned android or ios directories, did you create a new development build after installing react-native-safe-area-context?
react-native-safe-area-context includes native code, so if you install it you need to rebuild your app so that it includes that native code. Otherwise when the JavaScript tries to call it it will not find it in your app and you will get an error like this.