Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

null is not an object (evaluating 'rngesturehandlermodule.direction')

I am creating a login system with react-native, after downloading the "react-native-gesture-handler" dependencies: "^ 1.1.0" and "react-navigation": "^ 3.5.1" began to appear the following message error:

null is not an object (evaluating 'rngesturehandlermodule.direction')

I tried to delete the project and reface it, delete and reinstall the node_modules folder and reinstall the dependencies, but nothing worked.

like image 950
Bruno Netto Avatar asked Mar 25 '19 18:03

Bruno Netto


4 Answers

cd into the ios subdirectory of your project and run pod install.

like image 150
Andrew Koster Avatar answered Oct 19 '22 18:10

Andrew Koster


I had the same issue. I then installed react-navigation & react-native-gesture-handler step by step as follows:

Steps :

  1. Remove node_modules and package-lock.json

  2. npm install

  3. npm install --save react-navigation

  4. npm install --save react-native-gesture-handler

  5. react-native link

You can find the original answer here

like image 9
Pranav Karnik Avatar answered Oct 19 '22 20:10

Pranav Karnik


  1. Stop the metro bundler with Ctrl+C from terminal.
  2. Run again metro bundler: npx react-native start
  3. Run again the build command npx react-native run-android

Building process maybe take a few minutes.

like image 8
Muhammed Ozdogan Avatar answered Oct 19 '22 20:10

Muhammed Ozdogan


I was facing this on Android.

All I did is:

  1. cd android
  2. gradlew clean
  3. closed metro bundler
  4. react-native run-android

solved my issue

like image 2
Sanan Ali Avatar answered Oct 19 '22 20:10

Sanan Ali