Firebase deploy keeps giving me an Error: Parse Error in remoteconfig.template.json
Asked Answered
I

3

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"
Inconspicuous answered 7/11, 2020 at 14:5 Comment(0)
M
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.

Misbegotten answered 7/11, 2020 at 14:29 Comment(2)
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.Domestic
Sounds like a great alternative answer @BenjaminRAIBAUD :)Misbegotten
A
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
}
Armoured answered 3/3, 2021 at 8:38 Comment(0)
B
0

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

Blackmarket answered 26/6, 2021 at 15:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.