5

I am trying to deploy a web app with firebase but every time I run deploy I keep getting this error

Error: Parse Error in remoteconfig.template.json:

No data, empty input at 1:1

^
File: "remoteconfig.template.json"
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
mac
  • 89
  • 2
  • 8

3 Answers3

7

You have a reference to a remoteconfig.template.json in your firebase.json files, but that template doesn't exist. This will typically look like:

  "remoteconfig": {
    "template": "remoteconfig.template.json"
  }

The solution is to find this section in your firebase.json file, and remove it.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 5
    I have to disagree with this approach because I believe the file exists but is empty. The suggested approach would break the reference to the ``remoteconfig`` defined template file (in that case ``remoteconfig.template.json``) going forward.I would suggest to avoid removing the mentionned section from the ``firebase.json`` file but instead add ``{ }`` in the template file, which would allow the ``firebase deploy`` to work. – Benjamin RAIBAUD Jan 06 '21 at 08:20
  • Sounds like a great alternative answer @BenjaminRAIBAUD :) – Frank van Puffelen Jan 06 '21 at 14:57
0

You are receiving this error because in your firebase init you included (or said yes to) remote config. For it to work with deploy you must add at least one parameter in the file remoteconfig.template.json like so;

{
    "example_minimum_score_for_level_2": 500
}
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
0

As @BenjaminRAIBAUD commented, if remoteconfig.template.json is empty, try adding { } to the file. That worked for me.

ernewston
  • 923
  • 6
  • 22