Error on jhipster:upgrade

柔情痞子 提交于 2019-12-12 03:51:46

问题


When I try to upgrade version of jhipster in my application I get following error:

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)

What am I doing wrong? Please write down in comment if any useful information is missing in my question.


回答1:


yo:jhipster:upgrade is working only for 3.4.0+

Source: jhipster support chat




回答2:


I did a "npm update -g generator-hipster" which worked. I too was on 3.6.1 prior to the upgrade when the error that you mentioned occurred.

https://jhipster.github.io/2016/09/16/jhipster-release-3.7.1.html refers to this step as manual upgrade.



来源:https://stackoverflow.com/questions/39376354/error-on-jhipsterupgrade

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