Invalid JSON character when running ng serve

saeef ahmed picture saeef ahmed · Jul 25, 2018 · Viewed 11.1k times · Source

I am getting following error when running ng serve...

PS F:\Projects\RecipeApp> ng serve
Invalid JSON character: "\"" at 76:13.
Error: Invalid JSON character: "\"" at 76:13.
    at _token (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:63:19)
    at _readArray (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:316:9)
    at _readValue (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:561:22)
    at _readProperty (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:398:19)
    at _readObject (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:431:30)
    at _readValue (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:564:22)
    at _readProperty (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:398:19)
    at _readObject (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:431:30)
    at _readValue (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:564:22)
    at _readProperty (F:\Projects\RecipeApp\node_modules\@angular-devkit\core\src\json\parser.js:398:19)

I am using angular version 6

Answer

JanRecker picture JanRecker · Jul 25, 2018

Check your Angular.json.

It seems that this config file is not correct.


Update for clarification:
A misplaced "/" in the angular.json will create exactly that kind of error.