【问题标题】:not able to exclude firestore from firebase emulators:start无法从 Firebase 模拟器中排除 Firestore:开始
【发布时间】:2020-01-16 17:06:16
【问题描述】:

我想在使用 firebase emulators:start 命令时排除本地 firestore 并连接 prod firestore。
基本上,我只想为功能和托管运行模拟器,所以当我尝试firebase emulators:start --only functions,hosting

我收到以下错误:

i  emulators: Starting emulators:
!  Not starting the functions hosting emulator, make sure you have run firebase init.
+  All emulators started, it is now safe to connect.

然后退出shell。

有一种解决方法可以运行两个模拟器 firebase emulators:start --only functionsfirebase emulators:start --only hosting,但为什么它不能在一个模拟器中运行?


P.S:我想使用emulator 方法而不是firebase serve 进行调试。

【问题讨论】:

    标签: firebase google-cloud-firestore firebase-tools


    【解决方案1】:

    似乎问题出在 powershell 本身。逗号是 powershell 中的一个特殊符号,用于表示数组分隔符。解决方案是在参数周围添加引号。

    # This WILL NOT work
    firebase emulators:start --only functions,hosting
    
    # This will work
    firebase emulators:start --only "functions,hosting"
    

    【讨论】:

      【解决方案2】:

      这似乎是一个错误,请在 GitHub 存储库上file an issue

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-10-03
        • 2021-12-16
        • 2020-03-14
        • 2018-05-21
        • 1970-01-01
        • 2022-10-14
        • 2020-10-21
        相关资源
        最近更新 更多