React Native + Firebase + Expo版本存在三角问题 [英] React Native + Firebase + Expo versions love triangle issues

查看:88
本文介绍了React Native + Firebase + Expo版本存在三角问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Expo使用Firebase实施React Native身份验证.我目前有以下版本:

I am trying to implement React Native authentication with Firebase using Expo. I am currently having following versions:

  • 博览会:20.0.0
  • npm:5.4.0
  • firebase:4.3.0

我收到以下错误:

错误:未安装React native.请在您的项目目录中运行npm install.

我怎么到这里

Expo建议使用npm 4.6.1版本. (实际上,在博览会论坛上此处在有关npm破坏应用程序的帖子中,建议将其降级为npm的4. *版本.但是Firebase 4.3.0无法使用npm 4.6.1版本安装.所以我将npm升级到了最新的5.4.0. Firebase安装得很好,但是现在我在Expo中得到了以上错误.这是我尝试使用npm 4.6.1安装Firebase时出现的错误消息:

How I got here

Expo recommends npm version 4.6.1. (In fact, on Expo forum here in post about npm breaking apps, it has been advised to downgrade to 4.* version of npm). But firebase 4.3.0 fails to install with npm version 4.6.1. So I upgraded npm to latest 5.4.0. Firebase installed fine, but now I get above error in Expo. And here is error message from when I try to install firebase with npm 4.6.1:

  • 我可以使用某些较早版本的Firebase来与npm 4.6.1一起使用吗?那是哪个版本?
  • 还有其他解决方法(较旧的firebase版本除外)吗?是否有人成功实施了RN + Firebase + Expo?

编辑:在博览会论坛上寻求答案:

Edit: seeking answers on Expo forum: link

推荐答案

我使用了

sudo npm install -s firebase@latest 

对我有用

这篇关于React Native + Firebase + Expo版本存在三角问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆