jhipster出错:升级

时间:2016-09-07 17:51:48

标签: npm jhipster

当我尝试在我的应用程序中升级jhipster版本时,我收到以下错误:

lothrimond@lothrimond-K53SD:~/workspace/NScanner$ npm list generator-jhipster
n-scanner@0.0.0 /home/lothrimond/workspace/NScanner
└── generator-jhipster@3.6.1 

lothrimond@lothrimond-K53SD:~/workspace/NScanner$ yo jhipster:upgrade 
Welcome to the JHipster Upgrade Sub-Generator 
This will upgrade your current application codebase to the latest JHipster version
Looking for latest generator-jhipster version...
/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:279
    throw new TypeError('Invalid Version: ' + version);
    ^

TypeError: Invalid Version: undefined
    at new SemVer (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:279:11)
    at compare (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:566:10)
    at Function.lt (/home/lothrimond/workspace/NScanner/node_modules/semver/semver.js:600:10)
    at null.<anonymous> (/home/lothrimond/workspace/NScanner/node_modules/generator-jhipster/generators/upgrade/index.js:93:28)
    at /home/lothrimond/workspace/NScanner/node_modules/shelljs/src/exec.js:172:7
    at ChildProcess.exithandler (child_process.js:194:7)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

我做错了什么?如果我的问题中缺少任何有用的信息,请写下评论。

2 个答案:

答案 0 :(得分:0)

哟:jhipster:升级仅适用于3.4.0 +

来源:jhipster support chat

答案 1 :(得分:0)

我做了一个&#34; npm update -g generator-hipster&#34;哪个有效。当您提到的错误发生时,我也在升级之前使用3.6.1。

https://jhipster.github.io/2016/09/16/jhipster-release-3.7.1.html将此步骤称为手动升级。