user20075027
user20075027

Reputation:

TypeError: Cannot read property 'createDrawerNavigator' of undefined

When I' using the react navigation version 6.1.1. I face this error. TypeError: Cannot read property 'createDrawerNavigator' of undefined

I have import the createDrawerNavigator from @react-navigation/drawer. But When I start the app the I saw this error TypeError: Cannot read property 'createDrawerNavigator' of undefined. How can I solve this error?

Screenshot of the error

Upvotes: 2

Views: 4900

Answers (3)

user20075027
user20075027

Reputation:

We have to import the gesture handler in the main index file. like this

import 'react-native-gesture-handler';

Upvotes: 2

Jatin Bhuva
Jatin Bhuva

Reputation: 1870

Open your android folder in android studio, then run from there.

Upvotes: 0

Ragnar
Ragnar

Reputation: 846

install "react-native-reanimated" and config your bable.config file

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    'react-native-reanimated/plugin'
  ],
};

and then

pod install
yarn start --reset-cache

Upvotes: 0

Related Questions