I got error on parse conf file nodejs

when i run my nodejs project i got this error on monitor process

Cannot parse config file: ‘/home/YDAPI/config/development.json’: SyntaxError: Expected double-quoted property name in JSON at position 191

so what should i correct for it ?

Hi dear I’m feel happy to help you don’t worry man
The error message you received indicates that there is a syntax error in your JSON configuration file, specifically in the file ‘/home/YDAPI/config/development.json’. The error message suggests that there is an issue with a property name that is not double-quoted.

To resolve this error, you should open the ‘development.json’ file and look for the property name at position 191. Make sure that the property name is enclosed in double-quotes (" ") as JSON requires all property names to be double-quoted.

For example, if you have a property named “name” in your JSON file, it should be written as:

{
“name”: “value”,
“property2”: “value2”,
“property3”: “value3”
}

If the issue is not with the property name at position 191, then you should check the rest of the file for other syntax errors. Once you have corrected the syntax errors, save the file and try running your Node.js project again.

thanks for your fast reply,
but i have strange issue my file not has 191 line it’s all about 121 line only so I don’t understand

Hi bro, now hope you can fix this problem
The error message suggests that there is a problem with the syntax of your JSON configuration file located at /home/YDAPI/config/development.json. Specifically, the error message states that it expected a double-quoted property name at position 191.

To fix the issue, you should open the configuration file and carefully review the contents of the file around position 191, looking for any property names that may be missing double-quotes.

Make sure that all property names in the JSON file are surrounded by double-quotes, like this:
{
“propertyName”: “propertyValue”,
“anotherPropertyName”: “anotherPropertyValue”
}
If you find any property names that are not surrounded by double-quotes, add them in and save the file. Then try running your Node.js project again. If the problem persists, carefully review the file for any other syntax errors or formatting issues.

@Marinipaving_Andmasonry, how is your second post any different from the first one?

Let see

vs

Also

compared to

And more with

in comparison to

Please do not rephrase the same answer again and again. This make us losing time as we have open and read the thread that does not bring any new information. It is starting to look as if you fed ChatGPT the same question and you got a slightly different answer but the same explanation but different words.

You assumed that position 191 meant line 191. It could be 191 characters or token. Open the file with firefox it might give you a better error message. You could also share the file and we will see. But read Formatting code and log snippets in posts first as it needs to be marked down correctly for us to really see the raw content.

i upload file that has an issue but I removed some sensitive keys for API

please check and tell me where the double quoted issue ?

1 Like

The error is wrong, running it through JSON parser in VSCode you’re missing the keys for:

  • Firebase email and password.
  • Your fairy needs a value for the cashIntegrationID
  • weAccept needs a value for CashCollection.
  • Google keys are no good, you need to have clientID, clientSecret
  • Get rid of all of the "//"s because that will break JSON.

Should look like this throughout, anything that doesn’t have an actual required value, you need to go through and setup.

After that, I’d rerun it and see what the next error is.

1 Like

yes i already removed key for security issue that’s all but I have