I've deployed in the past many times before. For some reason, today I am getting this error I can't seem to fix. I've tried changing tabs out with 2 or 4 spaces. I've tried different formats, and nothing works.
Here's what it says:
Error: There was an error loading firebase.json
Trailing comma in object at 29:9
}
^
Here is my firebase.json
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public"
}
}
How do I solve it?
PS: If you need anything else please ask.
Change your firebase json file to
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public",
"rewrites": [
]
}
}
If you are still having issues then you also have to change your database file to
{
"rules": {
".read": "auth != null",
".write": "auth != null"
}
}
To anyone experiencing this problem, I solved mine by going to the file "database.rules.json", and removing the last comma in the line ".write": true,
{
"rules": {
".read": true,
".write": true,
}
}
It seems Firebase generated an invalid JSON.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With