Firebase 部署不断给我一个错误:在 remoteconfig.template.json 中解析错误

mac*_*mac 5 android firebase firebase-remote-config firebase-cli

我正在尝试使用 firebase 部署 Web 应用程序,但每次运行 deploy 时,我都会收到此错误

Error: Parse Error in remoteconfig.template.json:

No data, empty input at 1:1

^
File: "remoteconfig.template.json"
Run Code Online (Sandbox Code Playgroud)

Fra*_*len 7

你有一个参考remoteconfig.template.json你的firebase.json文件,但模板不存在。这通常看起来像:

  "remoteconfig": {
    "template": "remoteconfig.template.json"
  }
Run Code Online (Sandbox Code Playgroud)

解决方案是在您的firebase.json文件中找到此部分,然后将其删除。

  • 我必须不同意这种方法,因为我相信该文件存在但为空。建议的方法将破坏对“remoteconfig”定义的模板文件(在这种情况下为“remoteconfig.template.json”)的引用。我建议避免从“firebase.json”中删除提到的部分`` 文件,而是在模板文件中添加 ``{ }`` ,这将允许``firebase deploy`` 工作。 (5认同)