EvanBacon / expo-native-firebase

🔥 Native Firebase Expo App (iOS, Android) Demo for Firestore, Notifications, Analytics, Storage, Messaging, Database 🚨
211 stars 41 forks source link

I only need expo-firebase-analytics, But this never works #12

Closed shubhamdeol closed 5 years ago

shubhamdeol commented 5 years ago

One more issue is this, I only need expo-firebase-analytics, But this never works, I had to import all the packages, performance, database, auth, functions... all. If we skip any, android app crashes saying error message like: can't find module expo-firebase-auth, even If don't use this.

I tried using rn firebase as well, but it makes things more complicated, Their official doc says

"Due to some breaking changes in v12+ of the Android Firebase libraries, you'll need to upgrade your Gradle version to at least v4.4"

whereas expo eject guide does not recommend to upgrade.

In one of the post on medium you clearly mentioned this:

"By having separate modules we can enable developers to create much slimmer apps. If there is a library you don’t want, or don’t need, just don’t include it"

But, I guess this does not work that way

Please help @EvanBacon

ghost commented 5 years ago

+1

ghost commented 5 years ago

You can comment out the libraries you are not using inside node_modules/expo-firebase-app/src/utils/getModuleInstance.js and it should work fine, But I am not sure if this is the perfect solution to this

note: this will not survive a yarn install, so you can use a package like this to keep the changes you made https://www.npmjs.com/package/patch-package

EvanBacon commented 5 years ago

It appears as though you have 1 issue in the title, and a completely different issue in the description. Please take the time to open 2 separate issues.

But, I guess this does not work that way

It does, exactly as I said in the article. I just tested it again: https://github.com/EvanBacon/expo-native-firebase/tree/%40evanbacon/analytics-example