title: Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js",
body: <p>I am trying to use <strong>createDrawerNavigator</strong> from <code>import { createDrawerNavigator } from '@react-navigation/drawer';</code> in react native. However, I am getting the error below, which I don't know how to solve.</p>
  <blockquote>
  <p>Error: Requiring module
  &quot;node_modules\react-native-reanimated\src\Animated.js&quot;, which threw an
  exception: Error: Reanimated 2 failed to create a worklet, maybe you
  forgot to add Reanimated's babel plugin?</p>
  </blockquote>
  <p>In <em>babel.config.js</em> I tried to add the below code but not working as well</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = function(api) {
    api.cache(true);
    return {
      presets: ['babel-preset-expo'],
      plugins: [
        'react-native-reanimated/plugin',
      ]
    };
  };
  </code></pre>
  <p>The Below code is my component</p>
  <pre class="lang-js prettyprint-override"><code>import * as React from 'react';
  import { Button, View } from 'react-native';
  import { createDrawerNavigator } from '@react-navigation/drawer';
  import { NavigationContainer } from '@react-navigation/native';
  
  function HomeScreen({ navigation }) {
    return (
      &lt;View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}&gt;
        &lt;Button
          onPress={() =&gt; navigation.navigate('Notifications')}
          title=&quot;Go to notifications&quot;
        /&gt;
      &lt;/View&gt;
    );
  }
  
  function NotificationsScreen({ navigation }) {
    return (
      &lt;View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}&gt;
        &lt;Button onPress={() =&gt; navigation.goBack()} title=&quot;Go back home&quot; /&gt;
      &lt;/View&gt;
    );
  }
  
  const Drawer = createDrawerNavigator();
  
  export default function MyDrawer() {
    return (
      &lt;NavigationContainer&gt;
        &lt;Drawer.Navigator initialRouteName=&quot;Home&quot;&gt;
          &lt;Drawer.Screen name=&quot;Home&quot; component={HomeScreen} /&gt;
          &lt;Drawer.Screen name=&quot;Notifications&quot; component={NotificationsScreen} /&gt;
        &lt;/Drawer.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  </code></pre>