小编Hud*_*son的帖子

世博会项目中的 Firebase 问题

每当我单击代码上的提交按钮将数据上传到我的 firebase 数据库时,我都会收到此错误:

ERROR [2024-01-21T03:39:39.733Z] @firebase/firestore: Firestore (10.7.2): INTERNAL UNHANDLED ERROR: TypeError: Cannot read property 'includes' of undefined

我尝试卸载节点模块,特别是 firebase,但没有任何效果。我尝试创建一个新的 firebase 帐户,但仍然无法正常工作。我想不明白。

import { StyleSheet, Text, View, TextInput, Button } from 'react-native';
import { getAuth } from 'firebase/auth';
import { getFirestore, doc, setDoc } from 'firebase/firestore';
import app from '../config/FirebaseConfig'; // Adjust this path as necessary

const DataInput = () => {
  const [monthOrderTotal, setMonthOrderTotal] = useState('');
  const [monthDollarAmount, setMonthDollarAmount] = useState('');

  const firestore = getFirestore(app);
  const auth = getAuth(); …
Run Code Online (Sandbox Code Playgroud)

firebase reactjs expo google-cloud-firestore

4
推荐指数
1
解决办法
958
查看次数

标签 统计

expo ×1

firebase ×1

google-cloud-firestore ×1

reactjs ×1