0

this error appeared

ERROR Invariant Violation: requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager.

This error is located at:
    in RNSScreenStackHeaderConfig (at HeaderConfig.tsx:164)
    in HeaderConfig (at NativeStackView.native.tsx:280)
    in RNSScreen (at createAnimatedComponent.js:211)
    in AnimatedComponent (at createAnimatedComponent.js:264)
    in AnimatedComponentWrapper (at src/index.native.tsx:257)
    in MaybeFreeze (at src/index.native.tsx:256)
    in Screen (at NativeStackView.native.tsx:214)
    in SceneView (at NativeStackView.native.tsx:342)
    in RNSScreenStack (at src/index.native.tsx:188)
    in ScreenStack (at NativeStackView.native.tsx:331)
    in NativeStackViewInner (at NativeStackView.native.tsx:388)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:87)
    in SafeAreaProvider (at SafeAreaProviderCompat.tsx:46)
    in SafeAreaProviderCompat (at NativeStackView.native.tsx:387)
    in NativeStackView (at createNativeStackNavigator.tsx:72)
    in Unknown (at createNativeStackNavigator.tsx:71)
    in NativeStackNavigator (at App.js:21)
    in EnsureSingleNavigator (at BaseNavigationContainer.tsx:430)
    in BaseNavigationContainer (at NavigationContainer.tsx:132)
    in ThemeProvider (at NavigationContainer.tsx:131)
    in NavigationContainerInner (at App.js:20)
    in App (at renderApplication.js:50)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:92)
    in RCTView (at View.js:32)
    in View (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:43)
    in Bayda9(RootComponent) (at renderApplication.js:60)
nadimxht
  • 1
  • 1
  • Does this answer your question? [Invariant Violation: requireNativeComponent: "RNCWebView" was not found in the UIManager](https://stackoverflow.com/questions/61832232/invariant-violation-requirenativecomponent-rncwebview-was-not-found-in-the-u) – ThomasSquall Aug 11 '22 at 07:12

2 Answers2

1

Add the following packages in the app's package.json (not the workspace root's package.json) has solved the problem for both iOS and Android.

"@react-navigation/native": "*",
"@react-navigation/native-stack": "*",
"react-native-screens": "*",
"react-native-safe-area-context": "*"

https://github.com/nrwl/nx-react-native/issues/98#issuecomment-995299032

0

1- npm i react-native-gesture-handler in your project terminal

2- go to the ios folder using terminal cd ios and then pod install

3- go back to your main folder cd ..

if still stacked! then open the ios folder in xcode and go to --> product --> Clean Build Folder

'restart' quit your simulator and open it again

that's all you need, happy code