title: Module not found: Can't resolve '@react-navigation/stack' React-Native
body: <p>Im trying to set a react-native project, in the project i tried only to create stack navigator in app.js with package react-navigation, I follow this guide <a href="https://reactnavigation.org/docs/getting-started" rel="nofollow noreferrer">https://reactnavigation.org/docs/getting-started</a> and then into <a href="https://reactnavigation.org/docs/hello-react-navigation" rel="nofollow noreferrer">https://reactnavigation.org/docs/hello-react-navigation</a> but Im getting error</p>
  <blockquote>
  <p>Failed to compile.
  D:/Visual Studio Code/Resturant Review/food/App.js
  Module not found: Can't resolve '@react-navigation/stack' in 'D:\Visual Studio Code\Resturant Review\food'
  this is my code :</p>
  </blockquote>
  <pre><code>//app.js
  
  import * as React from 'react';
  import { View, Text } from 'react-native';
  import { NavigationContainer } from '@react-navigation/native';
  import { createStackNavigator } from '@react-navigation/stack';
  
  function HomeScreen() {
    return (
      &lt;View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}&gt;
        &lt;Text&gt;Home Screen&lt;/Text&gt;
      &lt;/View&gt;
    );
  }
  
  const Stack = createStackNavigator();
  
  function App() {
    return (
      &lt;NavigationContainer&gt;
        &lt;Stack.Navigator&gt;
          &lt;Stack.Screen name=&quot;Home&quot; component={HomeScreen} /&gt;
        &lt;/Stack.Navigator&gt;
      &lt;/NavigationContainer&gt;
    );
  }
  
  export default App;
  </code></pre>
  <pre><code>/// package.json
  {
    &quot;main&quot;: &quot;node_modules/expo/AppEntry.js&quot;,
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;expo start&quot;,
      &quot;android&quot;: &quot;expo start --android&quot;,
      &quot;ios&quot;: &quot;expo start --ios&quot;,
      &quot;web&quot;: &quot;expo start --web&quot;,
      &quot;eject&quot;: &quot;expo eject&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@react-native-community/masked-view&quot;: &quot;0.1.10&quot;,
      &quot;@react-navigation/native&quot;: &quot;^5.7.3&quot;,
      &quot;expo&quot;: &quot;~38.0.8&quot;,
      &quot;expo-status-bar&quot;: &quot;^1.0.2&quot;,
      &quot;react&quot;: &quot;~16.11.0&quot;,
      &quot;react-dom&quot;: &quot;~16.11.0&quot;,
      &quot;react-native&quot;: &quot;https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz&quot;,
      &quot;react-native-gesture-handler&quot;: &quot;~1.6.0&quot;,
      &quot;react-native-reanimated&quot;: &quot;~1.9.0&quot;,
      &quot;react-native-safe-area-context&quot;: &quot;~3.0.7&quot;,
      &quot;react-native-screens&quot;: &quot;~2.9.0&quot;,
      &quot;react-native-web&quot;: &quot;~0.11.7&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/core&quot;: &quot;^7.8.6&quot;,
      &quot;babel-preset-expo&quot;: &quot;~8.1.0&quot;
    },
    &quot;private&quot;: true
  }
  
  </code></pre>
  <p>Please Note I tried to <code>npm install</code>, restart project, deleting and installing and all kind of suggestions I found on the web but it didn't work.</p>
  <p>Thank you so much for your help!.</p>