I need to fix this error.
Invariant Violation: requireNativeComponent: "RNGestureHandlerRootView" was not found in the UIManager.
This error is located at: in RNGestureHandlerRootView (created by GestureHandlerRootView) in GestureHandlerRootView (created by StackView) in StackView (created by StackView) in StackView in Unknown (created by Navigator) in Navigator (created by SceneView) in SceneView (created by SwitchView) in SwitchView (created by Navigator) in Navigator (created by NavigationContainer) in NavigationContainer (created by ExpoRoot) in ExpoRoot in RCTView (created by View) in View (created by AppContainer) in RCTView (created by View) in View (created by AppContainer) in AppContainer
Recently I had the same problem. Here's the solution:
expo install react-native-gesture-handler
and
import 'react-native-gesture-handler';
On the root of the Project, the App.js file probably.
Try to use the documentation, it can be found here, and it's how I resolved this issue: https://reactnavigation.org/docs/getting-started/
On an existing Expo project
some dependencies versions installed by you may be incompatible with Expo. This causes such errors. To fix this issue you need the right versions of those dependencies. Run the following command to remove the incompatible versions and install the supported versions as required by Expo.
expo update
Confirm the action with Y
if it prompts your approval. Then restart your app. This will fix the issue.
If you don't have react-native-gesture-handler
installed in your project, install it.
expo
you may not require to follow the step 1 above.expo install react-native-gesture-handler
npm
or yarn
you also need to follow the step 1 above.npm install react-native-gesture-handler
App.js/ App.tsx
, place it in the first line of the file, or use as required:import 'react-native-gesture-handler';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With