我试图运行一个基本的Jhipster应用程序,从下面的内容来看 .jdl
文件。
我运行以下命令。
jhipster import-jdl sample.jdl
./mvnw
从那里我看到以下错误。
application {
config {
baseName sample,
applicationType monolith,
packageName com.sample.myapp,
prodDatabaseType postgresql,
cacheProvider infinispan,
buildTool maven,
useSass true,
testFrameworks [protractor]
}
entities *
}
entity Parent {
symbol String unique
description String
}
entity Child {
location String unique
comment String
balance Long
childType ChildType
}
enum ChildType {
ALPHA,
BETA
}
relationship OneToMany {
Parent to Child
}
该日志可在以下网站查看 https:/gist.github.commagick9372354c7f20c52180b0ffa53ae5b6b70b。
openjdk 12.0.2 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
INFO! Using JHipster version installed locally in current project's node_modules
我也试过
npm install
npm start
jhipster import-jdl sample.jdl
./mvnw
但仍然得到同样的错误
正如它所说,问题是由于 npm install
没有正常运行!
试着依次运行以下命令。
npm install
npm start
然后尝试导入你的.jdl或.jh文件。
jhipster import-jdl sample.jdl
然后
./mvnw
请原谅我,如果这听起来很愚蠢。但你用的是哪个浏览器?
我在使用Firefox 75.0时也有类似的行为。当我启动一个vanilla jhipster生成的应用程序时 就会出现上面的错误 而且我可以看到没有调用后台。JavaScript控制台只打印了
"TypeError: clazz.decorators is undefined"
当我使用Chrome浏览器时,该应用程序似乎工作得很好(再次强调:没有添加任何实体的普通jhipster应用程序)。