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 ?
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