I can't compile my project because of this error.
Unable to resolve module
@react-navigation/core
fromnode_modules\@react-navigation\native\src\createAppContainer.js
:
When I run I encounter with this problem. Can anybody help me?
Sometimes such error occurs as the package-json.lock file which locks the version.
So do 1 thing remove the version of @react-navigation and all related dependencies from your package.json and after that do following once again
npm install @react-navigation/native --save
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view --save
Must help!
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.