JHipster Entity sub generator - no properties in common with type 'Component'

落花浮王杯 提交于 2019-12-11 05:14:53

问题


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:

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

During this process I get these errors:

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'.

ERROR in [at-loader] ./dummy/path/car-dialog.component.ts:147:27 TS2559: Type 'typeof CarDialogComponent' has no properties in common with type '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'.

Which can be fixed by changing:

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

to:

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


回答1:


This has been resolved now.

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

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



来源:https://stackoverflow.com/questions/45290211/jhipster-entity-sub-generator-no-properties-in-common-with-type-component

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