Home > Software engineering >  TypeError: Cannot read property 'createDrawerNavigator' of undefined
TypeError: Cannot read property 'createDrawerNavigator' of undefined

Time:12-20

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

CodePudding user response:

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

CodePudding user response:

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

  • Related