Unable to resolve module 'react-navigation'
This error means that either you haven't installed the react-navigation
module or that you have installed the module but didn't re-built your project using react-native run-android
or react-native run-ios
.
Following these steps should solve your issue:
- Install
react-navigation
module. - Re-build your project.
- Restart the packager by stopping the current packager and then
starting the packager again with
react-native start
.
Date : 25-June-2020 Working :
Follow this steps:
Install React Navigation npm install react-navigation
Install Dependencies expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view
Install React Navigation Stack npm install react-navigation-stack @react-native-community/masked-view
Start the app and clear cache with npm start -c
We need to install the following dependencies:
npm i react-navigation @react-native-community/masked-view react-native-gesture-handler react-native-reanimated react-native-safe-area-context react-native-screens
In code import the following:
import {createAppContainer} from 'react-navigation';
import {createStackNavigator} from 'react-navigation-stack';
You have to just install the missing module ex.
npm install react-navigation
Then restart with
npm start