【发布时间】:2018-08-14 07:40:47
【问题描述】:
我有一个 jhipster 项目。它在开发模式下运行良好。当我尝试在生产模式下构建(使用 cmd“mvnw -Pprod”)时,我收到了错误:
错误 src\main\webapp\app\entities\ext-task\ext-task-group-list\ext-task-group-list.component.html(1,457): :预期 0 个参数,但得到 1 个。 src\main\webapp\app\entities\ext-task\ext-task-group-list\ext-task-group-list.component.html(1,665): :预期 0 个参数,但得到 1 个。 src\main\webapp\app\entities\ext-task\ext-task-list-template\ext-task-list-template.component.html(1,302): :预期 0 个参数,但得到 1 个。 src\main\webapp\app\entities\ext-task\ext-task-list-template\ext-task-list-template.component.html(1,505): : 预期 0 个参数,但得到 1 个。
所有 4 个错误都指向第 1 行,该行是空的。
为了找到实际的行号,我尝试了以下cmd(在so中找到)。
yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www
遇到同样的错误。
如何找到错误行号? mvnw 中是否有可用的调试选项来显示更多信息?如何解决这个错误?
【问题讨论】:
-
错误指向第 1 行,但列号 457 非常大,所以我怀疑您的整个文件被视为单行,可能是行尾编码有问题。