JHipster JDL not generating anything because the database type must be passed

夙愿已清 提交于 2019-12-20 05:43:13

问题


I'm using Jhipster 4.5.3 to generate some code from a JDL file I've created. Because I couldn't generate anything, I took the JDL Blog sample... and I have the same issues.

The JDL documentation still mentions :

You can generate entities from a JDL file by running jhipster import-jdl your-jdl-file.jh

But when I do that I get :

The jdl is being parsed. { name: 'NullPointerException', message: 'The parsed JDL content and the database type must be passed.',

Looking at the code, it looks like we have to pass a new parameter, the database type (this is not mentioned in the doc BTW). Looking at the code again, there are quite a few database types to choose from. But any database I choose, I get

Error: Could not find postgresql, make sure the path is correct!

at Environment.error (/Users/agoncal/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:89:38)
at jdlFiles.forEach (/Users/agoncal/.config/yarn/global/node_modules/generator-jhipster/generators/import-jdl/index.js:42:34)
at Array.forEach (native)
at constructor.validate (/Users/agoncal/.config/yarn/global/node_modules/generator-jhipster/generators/import-jdl/index.js:40:31)
at Object.<anonymous> (/Users/agoncal/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:417:23)
at /Users/agoncal/.config/yarn/global/node_modules/yeoman-generator/node_modules/run-async/index.js:25:25
at Promise (<anonymous>)
at /Users/agoncal/.config/yarn/global/node_modules/yeoman-generator/node_modules/run-async/index.js:24:19
at /Users/agoncal/.config/yarn/global/node_modules/yeoman-generator/lib/index.js:418:9
at runCallback (timers.js:800:20)

Any idea ?


回答1:


Did you generate an app with 'yo jhipster' first ? Can you post the generated .yo-rc.json ?



来源:https://stackoverflow.com/questions/44634055/jhipster-jdl-not-generating-anything-because-the-database-type-must-be-passed

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!