When I attempt to utilize react-native-gesture handler, I encounter the following error:
: While attempting to find module 'react-native-gesture-handler' from file '/Users/user/Project/index.js', the package '/Users/user/Project/node_modules/react-native-gesture-handler/package.json' was located successfully. However, this package specifies a 'main' module field that could not be resolved ('/Users/user/Project/node_modules/react-native-gesture-handler/index.js'. In fact, none of these files exist: [...]
This is my index.js file:
/**
* @format
*/
import 'react-native-gesture-handler';
import { NavigationContainer, StackActions } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import React from 'react';
import {AppRegistry} from 'react-native';
import Logsg from './screens/logsg.js';
import {name as appName} from './app.json';
const AuthStack = () => {
return(
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Logsg" component ={Logsg}/>
</Stack.Navigator>
</NavigationContainer>
)
}
AppRegistry.registerComponent(appName, () => AuthStack);