Node -config cannot parse configuration SyntaxError: Unexpected token
I am trying to use node-config in my Node.js project.
Unfortunately I keep getting the error when node-config tries to parse my JSON.
Here JSON is throwing an error (actual data is replaced with placeholder data)
{
"Winston": {
"Mail": {
"to": "abc@test.com",
"from": "errors@test.com",
"host": "localhost"
}
}
}
Here's the error I'm getting:
Error: Unable to parse config file: '../config/default.json' SyntaxError: Unexpected token 
I can't see where the syntax is wrong, but any help is appreciated.
source to share
Marc B who did the trick.
I actually recreated the file in another editor and that fixed all the problems.
The original .json file I posted was generated using the .json template in VS2013 with Node Tools for Visual Studio . Once I restored the file using Atom.io and restarted my node app everything worked fine.
Thanks again for your help by Marc Bed and .
source to share