Open zzbynzz opened 5 years ago
I installed package : @firebase/firestore , but it still notify error :
error: bundling failed: Error: Unable to resolve module
@firebase/appfrom
/Users/quan_tb/workspaces/pharmedia/mobile/node_modules/@firebase/firestore/dist/index.cjs.js: Module
@firebase/appdoes not exist in the Haste module map
Seems @firebase/firestore can't work with react-native-firebase, as it says :
This package is not intended for direct usage, and should only be used via the officially supported firebase package.
No one care :'(
@zzbynzz Have you solved? I am having the same issue.
Should anyone else stumble accross the same issue:
The documentation is not very clear (on react-native-firebase) but you should import the firebase tool you intend to use for the saga. As example:
import firebase from '@react-native-firebase/app';
import ReduxSagaFirebase from 'redux-saga-firebase';
import '@react-native-firebase/auth'; // <--- import it here
import '@react-native-firebase/firestore'; // <--- import it here
const firebaseApp = firebase.apps[0];
const rsf = new ReduxSagaFirebase(firebaseApp);
export default rsf;
This was the clue: https://rnfirebase.io/app/usage#switching-app-instance
I integrated using code: `import firebase from 'react-native-firebase'; import ReduxSagaFirebase from 'redux-saga-firebase';
const reduxSagaFirebase = new ReduxSagaFirebase(firebase.app);
export default reduxSagaFirebase;` But still receive error (I need use Firestore) :