react-native-google-signin / google-signin

Google Sign-in for your React Native applications
https://react-native-google-signin.github.io/
MIT License
3.23k stars 881 forks source link

Facing issue to import @react-native-google-signin / google-signin in my react native expo blank template #1331

Closed tejartr7 closed 1 month ago

tejartr7 commented 2 months ago

I have searched open and closed issues for this issue.

This is not a bug report for DEVELOPER_ERROR

Minimal reproducible example

https://github.com/tejartr7/RNError

What platform(s) does this occur on?

Android

Summary

This is the error i see as soon as i import the following line import { GoogleSignin, GoogleSigninButton, statusCodes, } from '@react-native-google-signin/google-signin'

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","SourceCode","Timing","AppState","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","Networking","Appearance","DevLoadingView","HeadlessJsTaskSupport","DeviceInfo","UIManager","ImageLoader","SoundManager","IntentAndroid","DeviceEventManager"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","LinkingManager","RNGoogleSignin"]}, js engine: hermes

Your computer environment

This is the error i see as soon as i import the following line import { GoogleSignin, GoogleSigninButton, statusCodes, } from '@react-native-google-signin/google-signin'

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNGoogleSignin' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","SourceCode","Timing","AppState","BlobModule","WebSocketModule","DevSettings","DevToolsSettingsManager","Networking","Appearance","DevLoadingView","HeadlessJsTaskSupport","DeviceInfo","UIManager","ImageLoader","SoundManager","IntentAndroid","DeviceEventManager"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","RedBox","BugReporting","LinkingManager","RNGoogleSignin"]}, js engine: hermes

vonovak commented 1 month ago

Hello and thanks for asking, you need to add the config plugin: https://react-native-google-signin.github.io/docs/setting-up/expo#add-config-plugin

and then rebuild:

https://react-native-google-signin.github.io/docs/setting-up/expo#rebuild-the-app Thank you 🙂