创建应用程序时出现Jhipster Ionic错误:getJhipsterAppConfig不是函数

时间:2019-05-17 18:30:49

标签: java angular ionic-framework npm jhipster

我正在尝试启动一个新的Jhipster Ionic,但是我被这个错误困住了:

$yo jhipster-ionic
events.js:183
      throw er; // Unhandled 'error' event
      ^

TypeError: this.getJhipsterAppConfig is not a function
    at module.exports.readConfig (C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\generators\app\index.js:63:47)
    at Object.<anonymous> (C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:424:27)
    at C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules\run-async\index.js:25:25
    at new Promise (<anonymous>)
    at C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules\run-async\index.js:24:19
    at self.env.runLoop.add.completed (C:\Users\User\AppData\Roaming\npm\node_modules\generator-jhipster-ionic\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:425:13)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5) 

这是我的npm版本:

+ yo@2.0.6
+ generator-jhipster-ionic@3.3.0
+ ionic@4.12.0
+-- generator-jhipster@6.0.1
`-- generator-jhipster-ionic@3.3.0
  `-- generator-jhipster@6.0.1

有人可以提供帮助吗?

1 个答案:

答案 0 :(得分:1)

显然这是一个已知的错误,jhipster-ionic小组目前正在对此进行处理。

我找到了一个临时解决方案:

在文件中:C:... \ YourPersonalDirectory \ AppData \ Roaming \ npm \ node_modules \ generator-jhipster-ionic \ generators \ app \ index.js

替换:

this.jhipsterAppConfig = this.getJhipsterAppConfig();

通过

this.jhipsterAppConfig = this.getAllJhipsterConfig();