SyntaxError: Unexpected token / in JSON at position 324

SyntaxError: Unexpected token / in JSON at position 324

JHipster: SyntaxError: Unexpected token / in JSON at position 324

对于

 entity Category {

 }
 relationship ManyToMany {
    Category{parents} to Category{children}
 }

命令

jhipster import-jdl jhipster-jdl.jh  --force

npm 6.4.1

10.13.0 Node.js.

如何解决这个问题?

https://www.jhipster.tech/jdl/

If you do not want to regenerate your entities while importing a JDL, you can use the --json-only flag to skip the entity creation part and create only the json files in .jhipster folder.

jhipster import-jdl ./my-jdl-file.jdl --json-only

这可能有助于通过让您查看中间 json 文件来诊断问题。

此外,您可能希望在您的实体之后删除空卷曲——这可能会让 jhipster 感到困惑?