I'm fairly new to React Native so I've been following the "The Complete React Native and Redux Course" by Stephen Grider. On section 9, lecture 59 he installs Firebase using npm with "npm install --save firebase", and so did I, however this only works for iOS for me. Whenever I run the app on an Android simulator I get this error saying Objects are not valid as a React child.
Screenshot
Edit: I'll try to explain this problem better as per advice from akraf. The only thing I need to do to recreate this Error is create a React Native project. Then install Firebase through npm to the project directory. Once I add the line "import firebase from 'firebase';" to the App.js file, the error occurs. Nothing else, just the import causes the error.
Try to install the version 5.0.2. Use this command as administrator:
npm install --save firebase#5.0.2
As far as i see, the current version (5.0.4) is buggy!
Related
I'm trying to use Firebase's new Next.js support for Hosting (see https://firebase.google.com/docs/hosting/nextjs) but I'm getting a weird error when I try to deploy. (Everything runs correctly in the local emulator suite, btw)
Screenshot of Console output with error
When I try to run firebase deploy --only hosting,functions -m "testing out next.js support" I'm getting the error Unable to find 'esbuild'. Install it into your local dev dependencies with 'npm i --save-dev esbuild''. I've already added esbuild to my dev dependencies, and it seems to be installed correctly. My project uses yarn, not npm, but for the sake of testing I tried install it with npm like the error suggested, but that didn't work either.
Has anyone used Firebase Next.js hosting or figured it out since they've released it? The documentation on that page I linked above is... not great.
Make sure that you are using the latest Firebase Tools as per the documentation: "Firebase CLI version 11.14.2 or later".
Run npm install -g firebase-tools to update your version.
I followed https://rnfirebase.io/#managed-workflow guide on how to install Firebase. I created a new Expo app with:
npx create-react-native-app -t with-dev-client
As written in the guide. I then did
npx expo install #react-native-firebase/app
npx expo install #react-native-firebase/auth
Having nothing in the project except a Button which, when pressed creates an account with createUserWithEmailAndPassword.
This is when I am presented with this error:
Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().
Ensure you have:
imported the 'io.invertase.firebase.app.ReactNativeFirebaseAppPackage' module in your 'MainApplication.java' file.
Added the 'new ReactNativeFirebaseAppPackage()' line inside of the RN 'getPackages()' method list.
See http://invertase.link/android for full setup instructions.
Did I mess up on the way, or is there more steps than the guide suggests, or is the way I created the app the cause?
This was tested on an Android Emulator, launched by pressing 'a' in the terminal.
I appreciate any help!
Additional info:
I added the Google services as shown in the guide, with the name corresponding to the package name given in app.json.
Running expo prebuild --clean:
It says "(node:14360) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package" which I don't know if it could create an issue such as this.
You need to install #react-native-firebase/app module and initialize, then only you can use any of the #react-native-firebase/xxx modules. check the official documentation for authorization module here.
I am attempting to set up a VueJS Authentication app using Vue 3 and Firebase on my Mac Mini and Macbook. I have gone through the steps to add Firebase to my VueCLI project, by inputting npm install firebase in the terminal after cd-ing to the project. after running npm install firebase, Firebase appears as a dependency in package.json. However, after importing firebase and adding the firebaseConfig (from my firebase dashboard) to main.js, as well as importing firebase into App.vue, I get an error in the terminal saying:
This dependency was not found:
* firebase in ./src/main.js
To install it, you can run: npm install --save firebase
This appears to happen only when attempting to run a Vue/Firebase project on MacOS. What is the proper way to install Firebase on a VueCLI project when running that project on MacOS? Thanks.
I'm using Expo v42.0.1 and trying to install Firebase v9.0.2 and am unable to do so.
Issue
From running expo install firebase, firebase version 8.2.3 is installed. When changing the package.json to use firebase version 9.0.2, I get an error when running the app:
"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.
What I've tried
Running yarn / npm install
Running expo install firebase#9.0.2 (which ends up just downloading 8.2.3)
Has anyone seen this before or know why it is happening? I believe it is because Expo v42 is not yet compatible with the modular version of firebase (v9).
You are correct.
Has anyone seen this before or know why it is happening? I believe it is because Expo v42 is not yet compatible with the modular version of firebase (v9).
But you can make it work with using it like this in you package.json:
"#firebase": "^9.0.2",
Discussion about this: "firebase" is added as a dependency in your project's package.json but it doesn't seem to be installed
I have used this solution in 2 projects. 1 works perfectly but in another I faced issued where version firebase#9.0.0-beta.7 works perfectly but in version firebase#9.0.2 everything but Firestore works
More about it here: Expo + firebase#9.0.1/9.0.0: #firebase/firestore:, Firestore (9.0.0): Could not reach Cloud Firestore backend
I want to use cloud messaging of firebase in my react native project. I followed installation in
docs but I got error when running project using react-native run-ios:
fatal error:
'GoogleUtilities/AppDelegateSwizzler/Private/GULApplication.h' file
not found
#import 'GoogleUtilities/AppDelegateSwizzler/Private/GULApplication.h'
I've run pod install --repo-update.
It works on android but on ios not.
It has been solved in latest update.
got the this error today.
add Podfile to
pod 'GoogleUtilities'
and change import to
#import 'GoogleUtilities/GULApplication.h