Invariant Violation: requireNativeComponent: “RNSScreenStackHeaderConfig” was not found in the UIManager.
1 min readOct 20, 2023
THIS IS A BUG LIBRARY , SO FIND IT AND GAVE THE FIX
//clean up
edit package.json to "react-native-screens": "^3.26.0"
delete node_modules & package-lock.json
delete Pods & Podfile.lock
npm cache clean --force
npm install
pod install
react-native run-ios --reset-cache
React Native cannot find the native component for the RNSScreenStackHeaderConfig
component. This can happen for a few reasons:
- You are using an outdated version of React Native.
- You have not installed the required dependencies.
- There is a problem with your installation.
To fix this error, you can try the following:
- Update React Native to the latest version.
- Install the required dependencies:
react-native-screens
react-native-safe-area-context
- Rebuild your project.
If you are still getting the error after following these steps, you may need to uninstall and reinstall React Native.
Here are some additional tips for avoiding this error:
- Make sure that you are using the correct version of the
react-native-screens
andreact-native-safe-area-context
packages. - Make sure that you are importing the
RNSScreenStackHeaderConfig
component from the correct package. - Make sure that you are calling the
requireNativeComponent
function correctly.