I created a basic react native app just to practice. As a first step, I followed the docs below to create a navigation from one page to another:
https://reactnative.dev/docs/navigation
I'm using React Native CLI, and installed:
npm install @react-navigation/native @react-navigation/native-stack
npm install react-native-screens react-native-safe-area-context
and I copied the code from the docs to my App.js file. When I'm hitting npx react-native run-android, I'm getting the following error:
error: Error: Unable to resolve module react-navigation from C:\Users\sh\NewProject\App.js: react-navigation could not be found within the project or in these directories: node_modules
I tried to delete node_modules and did npm install - didn't help.
Any idea how to resolve this? thanks