i'm trying to use firebase firestore and firebase authentication. here my config.js files codes
import { initializeApp } from 'firebase/app'
import {
initializeAuth,
getReactNativePersistence
} from 'firebase/auth/react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { apiKeyUrl, apiIdUrl } from './env'
const apiKey = apiKeyUrl.apiKey
const apiId = apiIdUrl.apiId
const firebaseConfig = {
apiKey: apiKey,
authDomain: ".",
projectId: ".",
storageBucket: ".",
messagingSenderId: ".",
appId: apiId,
measurementId: "."
};
const app = initializeApp(firebaseConfig)
const auth = initializeAuth(app, {
persistence: getReactNativePersistence(AsyncStorage)
});
export { auth }
here my babel.config.js codes
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
"plugins": [
["@babel/plugin-proposal-decorators", { legacy: true }]
["module:react-native-dotenv", {
"envName": "APP_ENV",
"moduleName": "@env",
"path": ".env",
"blocklist": null,
"allowlist": null,
"blacklist": null, // DEPRECATED
"whitelist": null, // DEPRECATED
"safe": false,
"allowUndefined": true,
"verbose": false
}]
]
};
and jsconfig.json codes
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Node",
"target": "ES2020",
"jsx": "react",
"strictNullChecks": true,
"strictFunctionTypes": true,
"experimentalDecorators": true,
"allowJs": true
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}
error is occuring because of one of these 3 pages but i don't know which one. app is starting at beginning but after reload or hotreload this is happening. i changed jsconfig.json and babel.config.json files for dotenv and mobx.
config.js: .plugins[0] must be a string, object, function