My expo app worked perfectly for a long time. Then I installed React-Navigation and now I get errors that I'm missing modules I don't need like react-native-gesture-handler. I installed that and now it needs react-native-screens. I can't just continue installing shit I don't need. So what is my Problem?
Error message:
Failed building JavaScript bundle.
Unable to resolve module react-native-screens from C:\Users\***\test\node_modules\@react-navigation\stack\src\views\Screens.tsx: react-native-screens could not be found within the project.
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-*
2 | import { Animated, View, ViewProps } from 'react-native';
3 |
> 4 | let Screens: typeof import('react-native-screens') | undefined;
| ^
5 |
6 | try {
7 | Screens = require('react-native-screens');
EDIT: I know see that I might need the module. And I've checked and it's there, but it doesn't work
CodePudding user response:
This is needed for React Navigation it needs this extra modules! Just follow: https://reactnavigation.org/docs/getting-started - the docs there are even specifying the installation when using expo.