'"RNGestureHandlerRootView" was not found in the UIManager

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



Solution 1:[1]

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/

Solution 2:[2]

1. Update dependencies with expo

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.

2. Install required dependencies

If you don't have react-native-gesture-handler installed in your project, install it.

  • If you install it with expo you may not require to follow the step 1 above.
expo install react-native-gesture-handler

  • But if you install it through npm or yarn you also need to follow the step 1 above.
npm install react-native-gesture-handler
  • To import it in App.js/ App.tsx, place it in the first line of the file, or use as required:
import 'react-native-gesture-handler';

Solution 3:[3]

react native error [1]: https://i.stack.imgur.com/czCTX.png

sole my side this code

expo install react-native-gesture-handler

Solution 4:[4]

A solution I found out if you are using expo ,run the command line expo update in your terminal. It fixes all the wrong dependencies and installs the correct packages.

Solution 5:[5]

what worked for me - i have delete all the node modules

$ npm install -g remove-node-modules

then insalled it again

 $ npm install

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 cigien
Solution 3 Vipin Chauhan
Solution 4 Shawn Lee
Solution 5 jmoerdyk