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

Firebase最新版本中getReactNativePersistence方法不存在的问题求助

Firebase最新版本中getReactNativePersistence方法不存在的问题求助

各位好,我在React Native项目里一直用Firebase Auth来处理用户登录会话的持久化,之前一直靠getReactNativePersistence这个方法来实现功能。

之前为了让这个方法正常工作,我在tsconfig.json里加了个路径映射的临时解决办法,具体配置如下:

{
  "extends": "expo/tsconfig.base",
  "compilerOptions": {
    "strict": true,
    "jsx": "react-jsx",
    "baseUrl": ".",
    "moduleResolution": "bundler",
    "allowImportingTsExtensions": true,
    "module": "esnext",
    "paths": {
      "~/*": ["src/*"],
      "@firebase/auth": [
        "./node_modules/@firebase/auth/dist/index.rn.d.ts"
      ]
    }
  }
}

这个配置之前一直都能正常跑,但最近升级到Firebase的最新版本后,这个方法突然就找不到了,报错说该方法不存在。有没有大佬遇到过类似的问题,能给我支个招吗?

内容来源于stack exchange

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.08 09:13:04