react-native-screens could not be found within the project or in these directories: node_modules/@react-navigation/native-stack/node_modules
If you are sure the module exists, try these steps: 1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro’s cache: yarn start — reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
Published in
2 min readFeb 5, 2022
This error might occur if you have installed react navigation previously and have missed out on installing certain dependencies into your project. Try running these commands in the terminal whilst in your project directory —
yarn add react-native-screens react-native-safe-area-context
Restart metro by pressing —
control c
Start metro again by running these commands in a split VSCode Terminal —
npx react-native start
And,
npx react-native run-ios
Depending on your version of React-Native, you might need to run this —
npx pod-install ios
You might get asked —
Need to install the following packages:
pod-install
Ok to proceed? (y)
Press —
y
The error would be resolved!