React-Native incompatibility 0.55.4

Asked

Viewed 153 times

0

react-native init --version 0.55.4 aplicativo

I used version 0.55.4 because the current version is giving error 500

npm install firebase --save

I used these two commands on the console, and went to the project to put the firebase reference

import firebase from 'firebase';

When I give React-Native run-android, error 500 appears

Error in the Node:

error: Unable to resolve module 'firebase' from app.js module firebase

  • Try to start the server with npm start and then execute the react-native run-android

  • Didn’t work =/

2 answers

0

Be happy

import firebase from '@firebase/app';
import '@firebase/auth'
import 'firebase/database';

0

One solution would be to use lib React-Native-firebase to perform this integration and is compatible with versions higher than 0.55 as documented.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.