这是我收到的错误。请帮忙。我现在不知道该怎么办。谢谢你
[...]$ jhipster jdl ~/Pobrane/awex.jdl
信息!使用全局安装的JHipster版本
信息!执行 import-jdl /home/UltimateSystems/Pobrane/awex.jdl
信息!正在解析 JDL。
错误:验证实体需要数据库类型。
从 JDL 解析应用程序和实体时出错:需要数据库类型来验证实体。
错误:验证实体需要数据库类型。
at checkForEntityErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/validators/jdl-without-application-validator.js:82:13)
at Object.checkForErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/validators/jdl-without-application-validator.js:69:7)
at checkForErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/jdl-importer.js:202:13)
at Object.import (/usr/local/lib/node_modules/generator-jhipster/jdl/jdl-importer.js:115:7)
at JDLProcessor.importJDL (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:210:43)
at JDLProcessor.importJDL (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:370:34)
at module.exports (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:512:17)
at /usr/local/lib/node_modules/generator-jhipster/cli/jdl.js:61:49
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 0)
导入 jdl 期间出错:错误:验证实体需要数据库类型。
错误:验证实体需要数据库类型。
at checkForEntityErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/validators/jdl-without-application-validator.js:82:13)
at Object.checkForErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/validators/jdl-without-application-validator.js:69:7)
at checkForErrors (/usr/local/lib/node_modules/generator-jhipster/jdl/jdl-importer.js:202:13)
at Object.import (/usr/local/lib/node_modules/generator-jhipster/jdl/jdl-importer.js:115:7)
at JDLProcessor.importJDL (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:210:43)
at JDLProcessor.importJDL (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:370:34)
at module.exports (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:512:17)
at /usr/local/lib/node_modules/generator-jhipster/cli/jdl.js:61:49
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 0)
错误! import-jdl 期间出错:需要数据库类型来验证实体。
错误:导入 jdl 期间出错:验证实体需要数据库类型。
at module.exports (/usr/local/lib/node_modules/generator-jhipster/cli/import-jdl.js:527:27)
at /usr/local/lib/node_modules/generator-jhipster/cli/jdl.js:61:49
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Promise.all (index 0)
只是为了回答这个问题。
正如@user15545005在他的评论中所说,
jhipster jdl
命令是从错误的目录执行的。
因此,如果您遇到此问题,请确保您正在从项目的
root 目录运行
jhipster jdl
命令。