我创建了一个JHipster网关项目,我会向User实体添加一些信息。随着
jhipster entity User --regenerate
我收到了这个错误:
Using JHipster version installed locally in current project's node_modules
Executing jhipster:entity User
Options: regenerate: true
events.js:160
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'endsWith' of undefined
at getAngularAppName (/home/denis/ngworkspace/sensorgw/node_modules/generator-jhipster/generators/generator-base.js:1786:65)
at getConfig (/home/denis/ngworkspace/sensorgw/node_modules/generator-jhipster/generators/entity/index.js:162:44)
at Object.<anonymous> (/home/denis/ngworkspace/sensorgw/node_modules/yeoman-generator/lib/index.js:399:25)
at /home/denis/ngworkspace/sensorgw/node_modules/run-async/index.js:25:25
at /home/denis/ngworkspace/sensorgw/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/home/denis/ngworkspace/sensorgw/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
当我创建一个实体并使用选项--force时,我有同样的错误。
我使用openSuse Leap42.3,yarn 1.2.1,node v6.11.1,npm 3.10.10,我的项目是用jhipster 4.9.0创建的。
我将jhipster升级到最新版本4.10.2,我无法升级我的项目(同样的错误)。
谢谢,丹尼斯
答案 0 :(得分:0)
由于getAngularAppName()
为空,您可能看到this.baseName
失败,请检查.yo-rc.json
是否属于baseName
属性。
还要检查父目录中没有.yo-rc.json
文件。