Demo, all content is generated
Question

Works in Expo Go but my dev build crashes: TurboModuleRegistry could not be found

Open · 141 views · asked by kaito · edited
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary.

Happens right at startup since I added Google sign in. Weird part is before adding it everything worked in Expo Go.

What I’ve tried

npm install again, deleted node_modules, cleared metro cache with npx expo start -c.

Comment
rebuilding now, will take a while on the free queue lol kaito · edited

3 answers

ben_mobile · edited

Native modules have to be compiled into the app. Installing the npm package only adds the JS side; your dev build was made before you added it, so the native part isn't in the binary.

Rebuild the dev client after adding any package with native code:

npx expo prebuild --clean   # if you build locally
eas build --profile development -p ios

And it will never work in Expo Go, because Expo Go only contains the modules Expo ships.

Comment
Every package with native code, yes. Pure JS packages you can add without rebuilding. ben_mobile · edited
rebuilt the dev client, it launches now. so every native package = new build? kaito · edited
arjun_codes · edited

Also check the package's config plugin is in app.json plugins. For google-signin it needs the iosUrlScheme, otherwise the rebuild succeeds and it crashes later at the actual sign in.

Comment
lukas_b · edited

If the EAS free queue is slow, eas build --profile development --platform ios --local builds on your own Mac. Needs Xcode and CocoaPods installed, but it's minutes instead of an hour in the queue.

Comment