简体   繁体   English

将 Firebase 链接到 React Native 应用程序后出现问题

[英]Problem after linking Firebase to a React Native app

I am trying to link my react-native app to firebase and work on the auth module.我正在尝试将我的 react-native 应用程序链接到 firebase 并在auth模块上工作。

I followed the steps of the installation in https://rnfirebase.io/我按照https://rnfirebase.io/中的安装步骤操作

It works when I run npx react-native run-android它在我运行npx react-native run-android时有效

But when I use expo start to work on the pre-production app I always get the error you attempted to use a firebase module that is not installed firebase.app()但是,当我使用expo start在预生产应用程序上工作时,我总是会收到错误you attempted to use a firebase module that is not installed firebase.app() 在此处输入图像描述

After working on this problem for while, after solving it, I would like to share my answer.在这个问题上工作了一段时间,解决了之后,我想分享一下我的答案。

The library https://rnfirebase.io/ does not work with a managed workflow like Expo, so be sure to use the bare workflow to work with the library.https://rnfirebase.io/不能使用像 Expo 这样的托管工作流,所以一定要使用裸工作流来使用库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM