JHipster实体子生成器-没有与“组件"类型相同的属性 [英] JHipster Entity sub generator - no properties in common with type 'Component'

查看:62
本文介绍了JHipster实体子生成器-没有与“组件"类型相同的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试更新现有实体时,使用实体"子生成器时出现问题.

I am having issues using the "entity" sub generator when attempting to update an existing entity.

运行生成器时,在过程结束时,将运行以下命令:

When running the generator, at the end of the process, the following command is run:

纱线运行清理&&纱线运行webpack:build:main

yarn run cleanup && yarn run webpack:build:main

在此过程中,我得到以下错误:

During this process I get these errors:

[加载程序]哑元/路径/车删除对话框中的错误.ts:58:23 TS2559:"typeof CarDeleteDialogComponent"类型与"Component"类型没有共同的属性.

ERROR in [at-loader] dummy/path/car-delete-dialog.component.ts:58:23 TS2559: Type 'typeof CarDeleteDialogComponent' has no properties in common with type 'Component'.

[加载器]中的错误./dummy/path/car-dialog.component.ts:147:27 TS2559:"typeof CarDialogComponent"类型没有与"Component"类型相同的属性.

ERROR in [at-loader] ./dummy/path/car-dialog.component.ts:147:27 TS2559: Type 'typeof CarDialogComponent' has no properties in common with type 'Component'.

[加载器]中的错误./dummy/path/car-dialog.component.ts:150:27 TS2559:"typeof CarDialogComponent"类型没有与"Component"类型相同的属性.

ERROR in [at-loader] ./dummy/path/car-dialog.component.ts:150:27 TS2559: Type 'typeof CarDialogComponent' has no properties in common with type 'Component'.

可以通过更改来解决:

his.modalRef = this.carPopupService
                .open(CarDialogComponent, params['id']);

收件人:

this.modalRef = this.carPopupService
                .open(CarDialogComponent as Component, params['id']);

这些错误仅与已更新的实体有关.

These errors are just related to the entity that has been updated.

我理解为什么必须这样做,但是不确定生成器等应处理的事情.

I understand why this has to be done but am unsure if this is something the generator etc should deal with.

JHipster版本是4.6.2(我最近对其进行了更新),并且我以前从未使用过子生成器,就像最初从JDL studio进行导入一样.

JHipster version is 4.6.2 (I recently updated it) and I've not used the sub generator before as originally did an import from JDL studio.

预先感谢您可以提供的任何帮助.

Thanks in advance for any help you can give.

推荐答案

现在已解决.

我在项目升级到的版本(v4.6.2)和全局JHipster Generator(v4.6.1)之间不匹配.

I had a mismatch between the version the project was upgraded to (v4.6.2) and the global JHipster Generator (v4.6.1).

将JHipster Generator版本更新到v4.6.2解决了该问题.

Updating the JHipster Generator version to v4.6.2 resolved the issues.

这篇关于JHipster实体子生成器-没有与“组件"类型相同的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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