"firebase" is added as a dependency in your project's package.json but it doesn't seem to be installed

Viewed 4251

"firebase" is added as a dependency in your project's package.json but it doesn't seem to be installed. Please run "yarn" or "npm install" to fix this issue.

I am getting this error while running react-native on expo-cli locally. I have firebase-7.9.0 and expo- ^40.0.0 in my dependencies still it is showing this error.

2 Answers

If you are using expo, you are supposed to install firebase using expo.

expo install firebase

I added @ before firebase and the build worked.

"dependencies": {
    "expo": "~41.0.1",
    "@firebase": "^9.0.0-beta.2",
    ...
  },
Related