ng 生成组件给出错误“Unexpected token/in JSON at position 629"; [英] ng generate component giving error "Unexpected token / in JSON at position 629"

查看:26
本文介绍了ng 生成组件给出错误“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屋!

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