React Native + Firebase + Expo 版本三角恋问题 [英] React Native + Firebase + Expo versions love triangle issues
问题描述
我正在尝试使用 Expo 使用 Firebase 实现 React Native 身份验证.我目前有以下版本:
- 世博会:20.0.0
- npm:5.4.0
- 火力基地:4.3.0
我收到以下错误:
<块引用>错误:未安装 React 本机.请在您的项目目录中运行 npm install
.
我是怎么来的
Expo 推荐 npm 版本 4.6.1.(事实上,在世博论坛
问题
- 我可以使用一些适用于 npm 4.6.1 的旧版 firebase 吗?那会是哪个版本?
- 是否有其他解决方法(除了较旧的 firebase 版本)?有人成功实施了 RN + Firebase + Expo 吗?
编辑:在 Expo 论坛上寻求答案:链接
我用这个
sudo npm install -s firebase@latest
对我有用
I am trying to implement React Native authentication with Firebase using Expo. I am currently having following versions:
- Expo: 20.0.0
- npm: 5.4.0
- firebase: 4.3.0
I get the following error:
Error: React native is not installed. Please run
npm install
in your project directory.
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:
Question(s)
- Can I use some older version of firebase which will work with npm 4.6.1? Which version would that be?
- Is there some other workaround (other then older firebase version)? Did anybody implement RN + Firebase + Expo successfully?
Edit: seeking answers on Expo forum: link
I use this
sudo npm install -s firebase@latest
it works for me
这篇关于React Native + Firebase + Expo 版本三角恋问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!