ng生成给出错误“在629位置的JSON中的意外令牌/"的组件. [英] ng generate component giving error "Unexpected token / in JSON at position 629"
问题描述
我刚刚从bitbucket克隆了一个angular 6项目,执行了npm install
和所有相关任务,它似乎运行良好,但是当我尝试使用angular-cli工具"ng generate component
"生成新组件时,我得到了错误
I just cloned an angular 6 project from bitbucket, did npm install
and all the related tasks, it seems to be working well, but when I try to generate a new component using the angular-cli tool "ng generate component
", I get the error
意外令牌/JSON位置629"
"Unexpected token / in JSON at position 629"
我该如何解决?
推荐答案
我也有同样的问题,当我尝试创建组件并进行谷歌搜索后,发现 https://jsonlint.com/,它会验证您的JSON文件,并指向确切的行和错误.
I also had same problem, when I trying to create component and after googling, I found https://jsonlint.com/ and which validate your JSON files and it points to the exact line and error.
有关更多信息,请参考以下主题: https://github.com/angular/angular-cli/issues/10880
For more information, please refer to following thread: https://github.com/angular/angular-cli/issues/10880
干杯!
这篇关于ng生成给出错误“在629位置的JSON中的意外令牌/"的组件.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!