• Register
1 vote
521 views

Problem :

I am beginner to react-navigation. Now I have a requirement to include the react-navigation to my exiting working code. So I have recently installed the required react-navigation in the existing React Native project. When I try to run my project I am encountering below error.

“Null is not an object (evaluating 'rngesturehandlermodule.direction')”.

 Please find below my  Navigation code for your reference.

import { mycreateStackNavigator } from 'react-navigation';

import MyHome from './screens/Home';
import MyWeatherDetail from './screens/WeatherDetail';


const MyNavigation = mycreateStackNavigator({
  MyHome: { myscreen: MyHome },
  MyWeatherDetail: {
  myscreen: MyWeatherDetail
 } 
});

export mydefault Navigation;

Also find below my App.js code for your reference.

import MyNavigator from './Router';

export mydefault class App extends Component {
   render() {
     return (
       <View style={styles.container}>
         <MyNavigator />
       </View>
     );
    }
  }

Please let me know how can I fix this issue?

8 4 1
5,680 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution :

I was going through your question. I will guide you through the steps which you might have missed.

So to begin with it you need to remove your node_modules also remove package-lock.json.

After above step you need to run npm install.

Now you must install the react-navigation package in the existing React Native project. After that you need to install the react-native-gesture-handler.

Now if you are using the Expo you don’t need to do anything after that everything is included in your SDK.

If not then the most tricky step for you use below command:

npm install react-native-gesture-handler

Lastly you need to link the gesture dependency as shown below:

react-native link react-native-gesture-handler

 If you follow all above steps then your issue will be resolved.

8 5 2
3,230 points

Related questions

0 votes
1 answer 5 views
5 views
Problem: I am trying to retrieve data from an API and then render it but I seem to be running into problems. I'm getting errors like: undefined is not an object (evaluating 'this.props.photos') in RenderPhotos_render
asked Mar 27 ummesalma 24.5k points
0 votes
1 answer 34 views
34 views
Problem: yarn' is not recognized as an internal or external command, operable program or batch file.
asked Feb 18 Lucky Guy 1.5k points
0 votes
1 answer 61 views
61 views
Problem: yarn' is not recognized as an internal or external command.
asked Feb 16 Ethan ross 2.6k points
0 votes
1 answer 3 views
3 views
Problem: I have a problem that i am unable to find any instance for object index.
asked Mar 22 waseem memon 2.4k points
0 votes
1 answer 17 views
17 views
Problem : I am trying to use the native base for making app in the react-native. I am very new to both things. how I can fix this error: Module appregistry is not a registered callable module (calling runapplication) .
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 4.4K views
4.4K views
Problem : I am trying to use the native base for making app in the react-native. I am very new to both things. When I try to run the app It gives me below error: &ldquo;Module appregistry is not a registered callable module (calling runapplication)&rdquo;Below is my code for ... </Header>             </Container>         );     } } My native-base version is as follows "native-base": "^2.1.2"
asked Jan 9, 2020 alecxe 7.5k points
0 votes
1 answer 8 views
8 views
Problem: When populating the listview with a valid data source, the following warning is printed at the bottom of the screen: Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of ListView.
asked Mar 15 ummesalma 24.5k points
0 votes
1 answer 2 views
2 views
Problem: I am trying to create a React-Native app and I need to connect my device to troubleshoot some issues that only occur on the physical device and not the simulator. For some reason, I have never been able to connect my Pixel 2 XL to my PC
asked Mar 31 ummesalma 24.5k points