You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Expo项目中@react-native-firebase/firestore相关错误排查求助

Expo + React Native Firebase 问题排查求助

遇到的错误

运行npx expo-doctor时触发两个核心错误:

  1. PluginError
Package "@react-native-firebase/firestore" does not contain a valid config plugin. Unexpected token 'typeof'
  1. Error [ERR_UNSUPPORTED_DIR_IMPORT]
    目录导入错误,指向路径@react-native-firebase/app/lib/common/index.js

已尝试的无效操作

  • 执行expo start -c清除Expo缓存
  • 在android目录运行./gradlew clean清理构建,反而引发更多错误
  • 将Node.js从v22.12.0降级到v18,出现新的兼容性错误
  • 确认@react-native-firebase/app、@react-native-firebase/auth、@react-native-firebase/firestore为最新版本且符合官方文档要求
  • 更新并重新安装所有依赖,确保版本匹配

环境详情

  • Expo SDK版本:52.0.18
  • React Native版本:0.76.5
  • Node.js版本:22.12.0
  • 核心依赖:@react-native-firebase/app、@react-native-firebase/auth、@react-native-firebase/firestore

已启用EXPO_CONFIG_PLUGIN_VERBOSE_ERRORS和EXPO_DEBUG日志,但未定位到明确根因。项目处于初期阶段,不想重新搭建,想请教:

  1. 还有哪些可行的排查或解决方法?
  2. 问题是否与Metro打包器或Firebase依赖直接相关?
  3. 这些Firebase库与Expo SDK 52是否存在已知兼容性问题?

内容的提问来源于stack exchange,提问作者Minolga Fox

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 08:37:06