Export 'ComposedGestureType' (reexported as 'ComposedGesture') was not found

Viewed 3619

I getting this error while compiling the project

"./node_modules/react-native-gesture-handler/lib/module/index.js
"export 'ComposedGestureType' (reexported as 'ComposedGesture') was not found in './handlers/gestures/gestureComposition' ". 

I really dont know what to do. I have these dependcies

  "dependencies": {
        "@react-navigation/native": "^6.0.6",
        "@react-navigation/native-stack": "^6.2.5",
        "@testing-library/jest-dom": "^5.16.1",
        "@testing-library/react": "^11.2.7",
        "@testing-library/user-event": "^12.8.3",
        "react": "^17.0.2",
        "react-dom": "^17.0.2",
        "react-native-gesture-handler": "^2.1.0",
        "react-native-safe-area-context": "^3.3.2",
        "react-native-screens": "^3.10.1",
        "react-native-web": "^0.17.5",
        "react-navigation": "^4.4.4",
        "react-scripts": "4.0.3",
        "web-vitals": "^1.1.2"
      }
4 Answers

You can change the react-native-gesture-handler version with "1.10.3". I am currently working on a react-native-web project and I got the same issue in the web side.

npm install react-native-gesture-handler@1.10.3

If you are interested with downgrading then just run this.

so I have the same problem.

@wirebug I will format so that it's easier for us to read

react-native-logs.fx.ts:22 ./node_modules/react-native-gesture-handler/lib/module/index.js:73
"export 'ComposedGestureType' (reexported as 'ComposedGesture') was not found in './handlers/gestures/gestureComposition'
  71 | export { NativeGestureType as NativeGesture } from './handlers/gestures/nativeGesture';
  72 | export { ManualGestureType as ManualGesture } from './handlers/gestures/manualGesture';
> 73 | export {
  74 |   ComposedGestureType as ComposedGesture,
  75 |   RaceGestureType as RaceGesture,
  76 |   SimultaneousGestureType as SimultaneousGesture,
warn    @   react-native-logs.fx.ts:22
printWarnings   @   webpackHotDevClient.js:138
handleWarnings  @   webpackHotDevClient.js:143
../../../../../../../../../usr/lib/node_modules

My dependencies are

{
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.11",
    "@react-navigation/native": "^6.0.6",
    "@react-navigation/stack": "^6.0.11",
    "expo": "~43.0.2",
    "expo-status-bar": "~1.1.0",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-native": "0.64.3",
    "react-native-gesture-handler": "^2.1.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.10.1",
    "react-native-web": "0.17.1"
  }
}

It's my first React Native project using a StackNavigator so I don't know where to start looking

Here is the code to make the error

import 'react-native-gesture-handler';
import React from "react";
import { Text, AppRegistry } from "react-native";

import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';

const Stack = createStackNavigator();

const Home = (props: { navigation: any, route: any }) => {
  return <>
    <Text>Home</Text>
  </>;
};

const App = () => (
  <NavigationContainer>
    <Stack.Navigator>
      <Stack.Screen
        options={{ headerShown: false }}
        name="Home"
        component={Home}
      />
    </Stack.Navigator>
  </NavigationContainer>
);

AppRegistry.registerComponent("MyApp", () => App);
export default App;

Open "./node_modules/react-native-gesture-handler/lib/module/index.js"

Comment or remove ComposedGestureType from export list

Related