Specify which file has JSON parsing error
See original GitHub issueWhen I use the firebase deploy
command I get this error:
Error: There was an error loading firebase.json:
Trailing comma in object at 11:9 } ^
My firebase.json
file looks like this:
{
"database": {
"rules": "database.rules.json"
},
"hosting": {
"public": "public"
}
}
The json file doesn’t even have line 11 !
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >What Is JSON and How to Handle an “Unexpected Token” Error
Learn what JSON is and how you can deal with errors occurring when parsing JSON data, such as "Unexpected Token < in JSON...
Read more >What is wrong with this JSON file? - Parse error - Stack Overflow
I am not sure what is causing the mistake. Everything is propely backslashed, there are commas, etc. Can you give me any advice?...
Read more >JSON parse error should specify which file failed #347 - GitHub
Basically we need to catch the jsonlint exception and throw a new exception that includes the filename. All reactions.
Read more >SyntaxError: JSON.parse: bad parsing Breaking Your Code ...
The JSON Parse error is a specific type of SyntaxError object. When Should You Use It? While most developers are probably intimately familiar ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Could there be a trailing comma in your rules file?
On Sat, Aug 20, 2016, 3:21 PM abdoosk notifications@github.com wrote:
I’m going to leave this open with the changed title “Specify which file has JSON parsing error” – the CLI ought to direct you to the place in which the error actually occurred.