Search code examples
react-nativeexponode-modules

Unable to resolve module firebase/auth/react-native


I updated the react-native dependency to [email protected] and got this error. I tried to revert back to a previous version @0.71.0 by editing the package.json file, deleting the node_modules folder running; npm cache clean --force then reinstalling npm however, I am still getting the same error.

Error:

error-message

Dependencies:

"dependencies": {
    "@react-native-firebase/app": "^18.3.0",
    "expo": "^48.0.7",
    "expo-constants": "~14.2.1",
    "expo-linking": "~4.0.1",
    "expo-router": "^1.2.0",
    "expo-splash-screen": "~0.18.1",
    "expo-status-bar": "~1.4.2",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.71.0",
    "react-native-gesture-handler": "~2.9.0",
    "react-native-reanimated": "~2.14.4",
    "react-native-safe-area-context": "4.5.0",
    "react-native-screens": "~3.20.0",
    "react-native-web": "~0.18.7",
    "remixicon": "^3.4.0"
  },

Solution

  • The firebase/auth/react-native entry point has been removed from Firebase SDK. Please take a look at https://firebase.google.com/support/release-notes/js#10.1.0

    In the meantime if you just want to go back you can drop the firebase app version "@react-native-firebase/app": "^17.4.0"

    For a fix that works with latest Firebase, remove any reference to 'firebase/auth/react-native' and use standard getAuth() functions.