ng 生成组件给出错误“Unexpected token/in JSON at position 629"; [英] 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"
我该如何解决这个问题?
How can I fix this?
推荐答案
我也遇到了同样的问题,当我尝试创建组件时,在谷歌搜索后发现 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 生成组件给出错误“Unexpected token/in JSON at position 629";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!