title: Unable to resolve dependency tree with react-navigation-stack
body: <p>I'm trying to learn navigation in React-native and I want to run this code:</p>
  <pre><code>import React, {Component} from 'react';
  import {StyleSheet, Text, View} from 'react-native';
  
  import {createAppContainer} from 'react-navigation';
  import {createStackNavigator} from '@react-navigation/stack';
  
  export default class App extends Component {
    render() {
      return &lt;AppContainer /&gt;;
    }
  }
  
  class HomeScreen extends Component {
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;Text&gt;Home&lt;/Text&gt;
        &lt;/View&gt;
      );
    }
  }
  
  const AppNavigator = createStackNavigator({
    Home: {
      screen: HomeScreen,
    },
  });
  
  const AppContainer = createAppContainer(AppNavigator);
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#F5FCFF',
    },
  });
  
  </code></pre>
  <p>But when I try to run with android I got an error like:</p>
  <pre><code> Error: Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API with React Navigation 5? See https://reactnavigation.org/docs/upgrading-from-4.x for migration guide.
   ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
        This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
   ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
        This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
  </code></pre>
  <p>After a brief research I tried re-install all dependencies and stuff. But still got an error when I tried to run &quot;expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view&quot; &gt;:</p>
  <pre><code>npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: NavigationApp@0.0.1
  npm ERR! Found: react@17.0.1
  npm ERR! node_modules/react
  npm ERR!   react@&quot;17.0.1&quot; from the root project
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer react@&quot;^16.0&quot; from @react-native-community/masked-view@0.1.10
  npm ERR! node_modules/@react-native-community/masked-view
  npm ERR!   @react-native-community/masked-view@&quot;^0.1.10&quot; from the root project
  npm ERR!
  npm ERR! Fix the upstream dependency conflict, or retry
  npm ERR! this command with --force, or --legacy-peer-deps
  npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
  npm ERR!
  npm ERR! See C:\Users\campo\AppData\Local\npm-cache\eresolve-report.txt for a full report.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\campo\AppData\Local\npm-cache\_logs\2021-03-17T16_11_56_237Z-debug.log
  
  </code></pre>
  <p>I couldn't find any updated solution online. And finally here is my package.json file:</p>
  <pre><code>{
    &quot;name&quot;: &quot;NavigationApp&quot;,
    &quot;version&quot;: &quot;0.0.1&quot;,
    &quot;private&quot;: true,
    &quot;scripts&quot;: {
      &quot;android&quot;: &quot;react-native run-android&quot;,
      &quot;ios&quot;: &quot;react-native run-ios&quot;,
      &quot;start&quot;: &quot;react-native start&quot;,
      &quot;test&quot;: &quot;jest&quot;,
      &quot;lint&quot;: &quot;eslint .&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@react-native-community/masked-view&quot;: &quot;^0.1.10&quot;,
      &quot;@react-navigation/native&quot;: &quot;^5.9.3&quot;,
      &quot;@react-navigation/stack&quot;: &quot;^5.14.3&quot;,
      &quot;fbjs&quot;: &quot;^3.0.0&quot;,
      &quot;react&quot;: &quot;17.0.1&quot;,
      &quot;react-native&quot;: &quot;0.64.0&quot;,
      &quot;react-native-gesture-handler&quot;: &quot;^1.10.3&quot;,
      &quot;react-native-reanimated&quot;: &quot;^2.0.0&quot;,
      &quot;react-native-safe-area-context&quot;: &quot;^3.2.0&quot;,
      &quot;react-native-screens&quot;: &quot;^2.18.1&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.12.9&quot;,
      &quot;@babel/runtime&quot;: &quot;^7.12.5&quot;,
      &quot;@react-native-community/eslint-config&quot;: &quot;^2.0.0&quot;,
      &quot;babel-jest&quot;: &quot;^26.6.3&quot;,
      &quot;eslint&quot;: &quot;7.14.0&quot;,
      &quot;jest&quot;: &quot;^26.6.3&quot;,
      &quot;metro-react-native-babel-preset&quot;: &quot;^0.64.0&quot;,
      &quot;react-navigation&quot;: &quot;^4.1.1&quot;,
      &quot;react-test-renderer&quot;: &quot;17.0.1&quot;
    },
    &quot;jest&quot;: {
      &quot;preset&quot;: &quot;react-native&quot;
    }
  }
  
  </code></pre>