skip to Main Content

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


  1. Try to install same version of react-native-screens and react-native. It might fix your issue.

    Login or Signup to reply.
  2. Maybe downgrade or upgrade to compatible package version. Check out the log for this (e.g.):

    The following packages should be updated for best compatibility with the installed expo version: 
    [email protected] - expected version: 4.8.2 
    [email protected] - expected version: ~3.29.0 
    Your project may not work correctly until you install the correct versions of the packages.
    

    In this case I would run the following commands to downgrade:

    npm install [email protected]
    npm install react-native-screens@~3.29.0
    

    Hope this helps!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search