Expo Go - Error (Invariant Violation: Module AppRegistry)

I have a Expo App within my Turborepo monorepo. It works great when I run the app in my web browser, no errors at all. However when I try to run the app within my Expo Go app on Android I get the following errors

app:dev: Logs for your project will appear below.
app:dev: Android Bundling complete 13937ms
app:dev:  WARN  The "EXNativeModulesProxy" native module is not exported through NativeModules; verify that expo-modules-core's native code is linked properly
app:dev:  WARN  No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?
app:dev:  ERROR  Error: Expo native runtime is not available: something went wrong and we aren't sure what it was. Please post more information and get support at https://forums.expo.dev.
app:dev:  ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
app:dev:       This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
app:dev:  ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
app:dev:       This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

(The line Android Bundle Complete and below appears when I load the app on Expo Go)

I feel like this is an issue with how the app is configured to run in the Monorepo. I have run another app that is not in a Monorepo and it is fine, so there is no issues with my connection to Expo Go.

Any help with this would be appreciated, thanks!

I have today spent another full day on this and I am now seeing the same error on a bare bones application that I have downloaded from an official repo. Is there something wrong with my set up for using expo? This is my first time building an app with Expo and I have been suprised with how hard it has been just to get it working.

Hi @gazmatron,

The original error message occurs in two cases:

Can you elaborate more or link to the bare bones app you mentioned here.

@amanhimself Thank you for helping me with this, going back to basics and reading the docs made me spot a mistake in my babel config that was causing the problem. Thanks!

2 Likes

Glad it got resolved!