4

I can't compile my project because of this error.

Unable to resolve module @react-navigation/core from node_modules\@react-navigation\native\src\createAppContainer.js:

When I run I encounter with this problem. Can anybody help me?

2 Answers 2

5

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!

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.