I experienced the same problem! The following in my project directory was what I found to be effective:
Installing @react-native-community/[email protected] with npm. The terminal will notify you if you need to upgrade to a new version after you perform the command. I personally had to replace @5.1.0 with the version I'm using, @6.5.2.
Here is link check it out:https://github.com/expo/snack/issues/257