Я столкнулся с этой проблемой с моим нативным проектом React, который я попытался вернуть к жизни через некоторое время. Undefined) < /p>
< /blockquote>
После внесения некоторых изменений в моем файле конфигурации я получу разные формы одной и той же ошибки, такие как < /p>
typeerror: не удается прочитать свойство «FireStore 'of ondefined, JS Engine: hermes < /p>
< /blockquote>
import firebase from "firebase/compat/app";
import "firebase/compat/auth";
import "firebase/compat/firestore";
import "firebase/compat/storage";
// Firebase config object
const firebaseConfig = {
apiKey: "xxxxxxxxxxxxxxxx",
authDomain: "xxxxxxxxxxxxxxxx",
projectId: "xxxxxxxxxxxxxxxx",
storageBucket: "bxxxxxxxxxxxxxxxx",
messagingSenderId: "2078619xxxx",
appId: "1:207xxxxxx:web:b869828e04bfxxxxxxxx",
measurementId: "G-9RZQxxxxxx"
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
const firestore = firebase.firestore();
if (firestore && firestore.settings) {
firestore.settings({ experimentalAutoDetectLongPolling: true });
}
//const analytics = getAnalytics(app);
const db = firebase.firestore();
const auth = firebase.auth()
const storageRef = firebase.storage().ref();
export { db, auth, storageRef, firebase }
< /code>
package.json
{
"name": "myproject",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@expo-google-fonts/raleway": "^0.2.3",
"@freakycoder/react-native-bounceable": ">=1.0.3",
"@gorhom/bottom-sheet": "^4",
"@react-native-community/checkbox": "^0.5.15",
"@react-native-firebase/app": "^18.2.0",
"@react-native-firebase/auth": "^17.5.0",
"@react-navigation/material-top-tabs": "^6.6.3",
"@react-navigation/native": "^6.1.6",
"@react-navigation/native-stack": "^6.9.12",
"@react-navigation/stack": "^6.3.16",
"@rneui/base": "^0.0.0-edge.2",
"@rneui/themed": "^0.0.0-edge.2",
"dayjs": "^1.11.13",
"expo": "^53.0.0",
"expo-app-loading": "~2.1.1",
"expo-blur": "~14.1.5",
"expo-haptics": "~14.1.4",
"expo-image-picker": "~16.1.4",
"expo-location": "~18.1.5",
"expo-splash-screen": "~0.30.9",
"expo-status-bar": "~2.2.3",
"expo-updates": "~0.28.15",
"firebase": "^9.22.0",
"geolib": "^3.3.3",
"lottie-react-native": "7.2.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.4",
"react-native-animatable": "^1.3.3",
"react-native-bouncy-checkbox": "^3.0.7",
"react-native-floating-label-input": "^1.4.2",
"react-native-gesture-handler": "~2.24.0",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-image-header-scroll-view": "^0.10.3",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-maps": "1.20.1",
"react-native-nested-scroll-view": "^9.0.0",
"react-native-pager-view": "6.7.1",
"react-native-reanimated": "~3.17.4",
"react-native-root-toast": "^3.6.0",
"react-native-safe-area-context": "5.4.0",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~4.11.1",
"react-native-shared-element": "^0.8.8",
"react-native-svg": "15.11.2",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.5.2",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.20.0",
"react-simple-form-validator": "^0.3.1",
"valtio": "^1.10.5"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@types/react": "~19.0.10",
"@types/react-native": "~0.72.0",
"@types/react-native-vector-icons": "^6.4.13",
"typescript": "~5.8.3"
},
"private": true
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... act-native
Firebase - Невозможно прочитать свойство неопределенная постоянная проблема (React Native) ⇐ Javascript
Форум по Javascript
1750701095
Anonymous
Я столкнулся с этой проблемой с моим нативным проектом React, который я попытался вернуть к жизни через некоторое время. Undefined) < /p>
< /blockquote>
После внесения некоторых изменений в моем файле конфигурации я получу разные формы одной и той же ошибки, такие как < /p>
typeerror: не удается прочитать свойство «FireStore 'of ondefined, JS Engine: hermes < /p>
< /blockquote>
import firebase from "firebase/compat/app";
import "firebase/compat/auth";
import "firebase/compat/firestore";
import "firebase/compat/storage";
// Firebase config object
const firebaseConfig = {
apiKey: "xxxxxxxxxxxxxxxx",
authDomain: "xxxxxxxxxxxxxxxx",
projectId: "xxxxxxxxxxxxxxxx",
storageBucket: "bxxxxxxxxxxxxxxxx",
messagingSenderId: "2078619xxxx",
appId: "1:207xxxxxx:web:b869828e04bfxxxxxxxx",
measurementId: "G-9RZQxxxxxx"
};
if (!firebase.apps.length) {
firebase.initializeApp(firebaseConfig);
}
const firestore = firebase.firestore();
if (firestore && firestore.settings) {
firestore.settings({ experimentalAutoDetectLongPolling: true });
}
//const analytics = getAnalytics(app);
const db = firebase.firestore();
const auth = firebase.auth()
const storageRef = firebase.storage().ref();
export { db, auth, storageRef, firebase }
< /code>
package.json
{
"name": "myproject",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@expo-google-fonts/raleway": "^0.2.3",
"@freakycoder/react-native-bounceable": ">=1.0.3",
"@gorhom/bottom-sheet": "^4",
"@react-native-community/checkbox": "^0.5.15",
"@react-native-firebase/app": "^18.2.0",
"@react-native-firebase/auth": "^17.5.0",
"@react-navigation/material-top-tabs": "^6.6.3",
"@react-navigation/native": "^6.1.6",
"@react-navigation/native-stack": "^6.9.12",
"@react-navigation/stack": "^6.3.16",
"@rneui/base": "^0.0.0-edge.2",
"@rneui/themed": "^0.0.0-edge.2",
"dayjs": "^1.11.13",
"expo": "^53.0.0",
"expo-app-loading": "~2.1.1",
"expo-blur": "~14.1.5",
"expo-haptics": "~14.1.4",
"expo-image-picker": "~16.1.4",
"expo-location": "~18.1.5",
"expo-splash-screen": "~0.30.9",
"expo-status-bar": "~2.2.3",
"expo-updates": "~0.28.15",
"firebase": "^9.22.0",
"geolib": "^3.3.3",
"lottie-react-native": "7.2.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-native": "0.79.4",
"react-native-animatable": "^1.3.3",
"react-native-bouncy-checkbox": "^3.0.7",
"react-native-floating-label-input": "^1.4.2",
"react-native-gesture-handler": "~2.24.0",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-image-header-scroll-view": "^0.10.3",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-maps": "1.20.1",
"react-native-nested-scroll-view": "^9.0.0",
"react-native-pager-view": "6.7.1",
"react-native-reanimated": "~3.17.4",
"react-native-root-toast": "^3.6.0",
"react-native-safe-area-context": "5.4.0",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "~4.11.1",
"react-native-shared-element": "^0.8.8",
"react-native-svg": "15.11.2",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.5.2",
"react-native-vector-icons": "^9.2.0",
"react-native-web": "^0.20.0",
"react-simple-form-validator": "^0.3.1",
"valtio": "^1.10.5"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@types/react": "~19.0.10",
"@types/react-native": "~0.72.0",
"@types/react-native-vector-icons": "^6.4.13",
"typescript": "~5.8.3"
},
"private": true
}
Подробнее здесь: [url]https://stackoverflow.com/questions/79676565/firebase-cannot-read-property-undefined-persistent-issue-react-native[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия