I am using firebase version 9.19.1 on my react-native application and now its giving me error problem with my application about the length. I need some help with my configuration file for using firebase version 9.19.1. How to i fix this length error problem for using this version on my react-native application?
// package.json
{
"name": "eshopmobile",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web"
},
"dependencies": {
"@react-navigation/native": "^6.1.6",
"@react-navigation/native-stack": "^6.9.12",
"expo": "~48.0.10",
"expo-status-bar": "~1.4.4",
"firebase": "^9.19.1",
"react": "18.2.0",
"react-native": "0.71.6",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0"
},
"devDependencies": {
"@babel/core": "^7.20.0"
},
"private": true
}
// firebase.js
// Import the functions you need from the SDKs you need
import * as firebase from "firebase";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
const firebaseConfig = {
apiKey: "*****",
authDomain: "eshopmobile-fb508.firebaseapp.com",
projectId: "eshopmobile-fb508",
storageBucket: "eshopmobile-fb508.appspot.com",
messagingSenderId: "734223583165",
appId: "1:734223583165:web:6849ecf86323894686b4d4"
};
// initialize firebase
let app;
if(!firebase.apps.length) {
app = firebase.initializeApp(firebaseConfig);
}
// const auth = firebase.auth()
export {firebase};