JHipster JDL没有生成任何内容,因为必须传递数据库类型 [英] JHipster JDL not generating anything because the database type must be passed

查看:774
本文介绍了JHipster JDL没有生成任何内容,因为必须传递数据库类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jhipster 4.5.3从我创建的JDL文件生成一些代码。因为我无法生成任何内容,所以我参加了 JDL Blog示例 ......我有同样的问题。

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.

JDL文档仍然提到:


您可以通过运行jhipster import-jdl your-jdl-file.jh

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

但是当我这样做时,我得到:

But when I do that I get :


jdl正在解析。
{name:'NullPointerException',
message:'必须传递已解析的JDL内容和数据库类型。',

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

在代码中查找 / a>,看起来我们必须传递一个新参数,即数据库类型(这在文档BTW中没有提到)。 再次查看代码,有很多数据库类型可供选择。但是我选择的任何数据库,我得到

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


错误:
找不到postgresql,确保路径正确!

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)

任何想法?

推荐答案

您是否首先使用'yo jhipster'生成应用程序?你能发布生成的.yo-rc.json吗?

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

这篇关于JHipster JDL没有生成任何内容,因为必须传递数据库类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆