ng生成给出错误“在629位置的JSON中的意外令牌/"的组件. [英] ng generate component giving error "Unexpected token / in JSON at position 629"

查看:63
本文介绍了ng生成给出错误“在629位置的JSON中的意外令牌/"的组件.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆