React Native + Firebase + Expo versions love triangle issues

884 Views Asked by At

I am trying to implement React Native authentication with Firebase using Expo. I am currently having following versions:

  • Expo: 20.0.0
  • npm: 5.4.0
  • firebase: 4.3.0

I get the following error:

Error: React native is not installed. Please run npm install in your project directory.

How I got here

Expo recommends npm version 4.6.1. (In fact, on Expo forum here in post about npm breaking apps, it has been advised to downgrade to 4.* version of npm). But firebase 4.3.0 fails to install with npm version 4.6.1. So I upgraded npm to latest 5.4.0. Firebase installed fine, but now I get above error in Expo. And here is error message from when I try to install firebase with npm 4.6.1:

enter image description here

Question(s)

  • Can I use some older version of firebase which will work with npm 4.6.1? Which version would that be?
  • Is there some other workaround (other then older firebase version)? Did anybody implement RN + Firebase + Expo successfully?

Edit: seeking answers on Expo forum: link

1

There are 1 best solutions below

0
On

I use this

sudo npm install -s firebase@latest 

it works for me