【问题标题】:Is there a way to run both firebase-tools v2 and v3 at the same time?有没有办法同时运行 firebase-tools v2 和 v3?
【发布时间】:2016-10-12 09:17:17
【问题描述】:

我有一些使用 SDK v3 的 firebase 应用,还有一些仍在使用 SDK v2。为了将应用程序部署到 Firebase 托管,我必须不断在两个版本的 firebase-tools 之间切换。有没有办法同时运行两个版本的 CLI?

【问题讨论】:

    标签: firebase firebase-hosting firebase-tools


    【解决方案1】:

    我已切换到使用 3.x 版本的 Firebase 工具作为我的全局版本:npm install firebase-tools -g

    然后对于我的遗留项目,我现在将 firebase-tools 版本保存在本地目录中,即npm install firebase-tools@2.2.1。在这种情况下,您可能必须使用 node_modules/firebase-tools/bin/firebase 运行它,因为全局版本优先。

    【讨论】:

    • 感谢您的及时回复,弗兰克。因此,当您在较旧的 2.x 版本项目中时,如何运行旧版“firebase”CLI。我在本地安装,但firebase -V 返回 3.0.2
    • 添加了一种方法。
    猜你喜欢
    • 2010-10-23
    • 2021-08-04
    • 1970-01-01
    • 2012-04-27
    • 2010-10-04
    • 2020-05-07
    • 2012-03-21
    • 2020-08-19
    • 2018-02-07
    相关资源
    最近更新 更多