Invalid JSON character when running ng serve
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.
Open the file in Notepad++ and change the encoding to UTF-8 then save it will work for sure :)
In my case the problem was Visual Studio 2017 adding UTF-8 BOM characters to angular.json after I edited the file.
Permanent solution for Visual Studio and Angular CLI was to open the file once and save as UTF-8 without signature
- Go to
File
->Save As
.
- Then on Save button click on triangle and click
Save with Encoding...
.
- From Encodings dropdown select
UTF-8 Without signature
-> ClickOK
.