I am beginner in react-native and I am getting below error, when I install and try to use react-navigation import {StackNavigator} from 'react-navigation'; I have tried a lot of link to resolve this but didn't find any solution. Below are the links:
Unable to resolve 'react-navigation'
https://github.com/react-community/react-navigation/issues/1846
https://github.com/facebook/react-native/issues/4968/
Please help me resolve the issue. Thanks in advance.
Try this Working for me
npm install @react-navigation/native @react-navigation/stack
Import like this
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
OR
Please make sure you are not getting any error in your terminal like this
Error: Unable to resolve module `**modules_name**` from `node_modules\
that can be the cause of that.
if you are getting please follow the command
npm install modules_name
for every module
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With