【问题标题】:React Native + Firebase + Expo versions love triangle issuesReact Native + Firebase + Expo 版本三角恋问题
【发布时间】:2018-02-12 05:32:53
【问题描述】:

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

  • 世博会:20.0.0
  • npm: 5.4.0
  • 火力基地:4.3.0

我收到以下错误:

错误:未安装 React 本机。请在您的项目目录中运行npm install

我是怎么来的

Expo 推荐 npm 版本 4.6.1。 (事实上​​,在 Expo 论坛 here 上关于 npm 破坏应用程序的帖子中,已建议降级到 4.* 版本的 npm)。但是 firebase 4.3.0 无法使用 npm 版本 4.6.1 安装。所以我将 npm 升级到最新的 5.4.0。 Firebase 安装得很好,但现在我在 Expo 中遇到了上述错误。这是我尝试使用 npm 4.6.1 安装 firebase 时的错误消息:

问题

  • 我可以使用旧版本的 firebase 来支持 npm 4.6.1 吗?那会是哪个版本?
  • 是否有其他解决方法(除了较旧的 firebase 版本)?有人成功实施了 RN + Firebase + Expo 吗?

编辑:在世博论坛上寻求答案:link

【问题讨论】:

标签: node.js firebase react-native npm expo


【解决方案1】:

我用这个

sudo npm install -s firebase@latest 

对我有用

【讨论】:

    猜你喜欢
    • 2018-09-18
    • 2019-02-28
    • 2021-03-25
    • 1970-01-01
    • 2021-10-13
    • 2020-02-23
    • 2020-01-31
    • 1970-01-01
    • 2022-12-22
    相关资源
    最近更新 更多