【问题标题】:updating firebase using expo client使用 expo 客户端更新 firebase
【发布时间】:2021-02-26 16:53:11
【问题描述】:

我正在开发一个 react native 应用程序,我使用 firebase,我最近更新了 expo,当我使用此命令 expo start 时,一切正常,但我在日志中收到此消息:

Some of your project's dependencies are not compatible with currently installed expo package version:
 - firebase - expected version range: 7.9.0 - actual version installed: ^8.2.0 Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...] Starting Metro Bundler

使用expo install firebase 时出现以下错误:

Installing 1 SDK 37.0.0 compatible native module using Yarn.
 > yarn add firebase@7.9.0
'yarnpkg' is not recognized as an internal or external command,
operable program or batch file.
 spawn yarnpkg ENOENT
Error: spawn yarnpkg ENOENT

如何正确更新 firebase?

【问题讨论】:

    标签: firebase react-native expo


    【解决方案1】:

    先做 npm install yarn -g

    完成之后 然后做

    纱线添加 firebase@7.9.0

    【讨论】:

    • 谢谢它没有用,虽然我得到了'firebase - 预期版本范围:7.9.0 - 安装的实际版本:^8.2.0'
    • 您可以尝试的另一件事是,删除 node_modules、任何锁定文件(package.lock 或 yarn.lock)。然后在 dependencies 下的 package.json 中,将 firebase 的版本改为 7.9.0。然后执行 yarn install 或 npm install
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-11-13
    • 1970-01-01
    • 2019-09-03
    • 1970-01-01
    • 1970-01-01
    • 2022-10-18
    • 1970-01-01
    相关资源
    最近更新 更多