I'm trying to use expo-auth-session to google signin in my react native application, but when running the code, i'm getting the error:
ERROR Error: Cannot find native module 'ExpoCrypto'
ERROR Invariant Violation: "main" has not been registered. This can happen if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent
wasn't called.
Already tried expo prebuild, but nothing changed.
package.json:
{
"name": "selvaapp",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test:types": "tsc"
},
"dependencies": {
"@notifee/react-native": "^7.7.1",
"@react-native-community/checkbox": "^0.5.15",
"@react-native-firebase/app": "^17.4.3",
"@react-native-firebase/auth": "^17.5.0",
"@react-native-firebase/firestore": "^17.4.3",
"@react-native-firebase/messaging": "^17.5.0",
"@react-navigation/drawer": "^6.6.2",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"axios": "^1.3.6",
"eas": "^0.1.0",
"eas-cli": "^3.15.0",
"expo": "~48.0.18",
"expo-auth-session": "~4.0.3",
"expo-build-properties": "~0.6.0",
"expo-checkbox": "~2.3.1",
"expo-constants": "~14.2.1",
"expo-crypto": "~12.2.1",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"expo-web-browser": "~12.1.1",
"firebase": "^9.22.0",
"formik": "^2.2.9",
"moment-timezone": "^0.5.43",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-dropdown-select-list": "^2.0.4",
"react-native-gesture-handler": "2.9.0",
"react-native-maps": "1.3.2",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
"react-native-vector-icons": "^9.2.0",
"yarn": "^1.22.19"
},
"resolutions": {
"@expo/config-plugins": "~6.0.0",
"@expo/prebuild-config": "~6.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.2",
"@types/react": "^18.2.12",
"@types/react-native-vector-icons": "^6.4.13",
"@types/react-test-renderer": "^18.0.0",
"@types/styled-components-react-native": "^5.2.1",
"ts-migrate": "^0.1.35",
"typescript": "^5.1.3"
},
"private": true
}