我使用 jhipster 创建了一个新项目并将其导入到 Intellij 中。 当我尝试创建新的角度分量时,出现错误。这就是我所做的:
文件 >> 新建 >> Angular cli >> 组件 > 确定。
我收到以下错误:
C:\Program Files\nodejs\node.exe" D:/TestareJhipster/Testare1/node_modules/@angular/cli\bin\ng generate component cacat
Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule.
Error: Could not find an NgModule for the new component. Use the skip-import option to skip importing components in NgModule.
Done
还有其他方法来创建组件吗?
JHipster 的另一种方法是运行:
jhipster entity yourEntityName --skip-server
摘自JHipster官方文档(http://www.jhipster.tech/creating-an-entity/)
这将跳过服务器端代码,仅生成 客户端代码。
或者,这个答案也可能对您有帮助:https://stackoverflow.com/a/46269000/2815598