-
Notifications
You must be signed in to change notification settings - Fork 12k
Angular CLI: 6.0.1 - Unexpected token } in JSON at position 2686 #10843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same error here but in another line: Unexpected token } in JSON at position 1075
|
I've updated Node to 10.1 and it's working...
|
Updated as well to Node 10.1.0 as suggested by @ToniJM Angular CLI: 6.0.1 |
When you call ng generate, it reads the angular.json file in your project. I had a similar issue, except mine was "Unexpected token /". I had commented out portions of the json file. The CLI did not like the my use of "//", so I had to remove the commented out sections, and it started working fine after that. So comb through your angular.json file, you probably have some malformed code in it. |
@briangullo you're right. Thanks!
|
@briangullo same problem here, thanks. |
Unexpected token ] in JSON at position 434 I pasted my angular.json file into a json validator and it clean. not sure where to look now. |
Use
|
I received this error as well. "Unexpected token }" or "]" probably means you put a comma after the last element. The error message doesnt provide the file name or line number but I'm guessing position is characters from start of file. I just opened angular.json in vim and the culprit was highlighted. Also, come on JSON specification, is that comma hurting anyone? ;) |
delete package-lock.json |
JSON is malformed, you can easily spot the error at https://jsonlint.com/ |
In my case I had a trailing ',' after one of my style imports in angular.json |
i used this command it resolved my issue |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Hi, when I try to create a component, I have this error :
Unexpected token } in JSON at position 2686
Versions
Repro steps
The text was updated successfully, but these errors were encountered: