I have a managed workflow expo application and I was having this issue unexpectedly because I was following the docs of the react navigation. The issue was related to the tab navigator that I was using, the stack navigator was working fine (in my app I have nested navigators) but when I was switching to the Bottom tabs navigator it crashes the app and gives the error mentioned in the title.
After some research I tried downloading the react-screens library but it did not seem to work, I closed the running metro instance and went to react navigation docs I noticed a command
npx expo install react-native-screens react-native-safe-area-context
I installed the packages above but with expo cli and not npm, after a restart it was working fine. If someone has the same issue please relate to expo when installing core packages and not npm.
Happy Coding!
I tried creating a new project and setting up everything from scratch but it does not seem to work
2
Answers
Try to install same version of
react-native-screens
andreact-native
. It might fix your issue.Maybe downgrade or upgrade to compatible package version. Check out the log for this (e.g.):
In this case I would run the following commands to downgrade:
Hope this helps!