将JHipster项目从v4.6.1升级到4.6.2失败

时间:2017-07-20 08:51:16

标签: jhipster

我试图将JHipster项目从版本4.6.1升级到版本4.6.2,但我发现了这个错误:

C:\Users\Andrea\workspace\Z_Test01>jhipster upgrade
Executing jhipster:upgrade
Options:
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...
WARNING! Something went wrong fetching the latest JHipster version number...
warning package.json: No license field
warning ..\..\package.json: No license field

events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: ERROR! Exiting process
    at Environment.error (C:\Users\Andrea\AppData\Local\Yarn\config\global\node_modules\yeoman-environment\lib\environment.js:140:40)
    at constructor.error (C:\Users\Andrea\AppData\Local\Yarn\config\global\node_modules\generator-jhipster\generators\generator-base.js:1610:18)
    at shelljs.exec (C:\Users\Andrea\AppData\Local\Yarn\config\global\node_modules\generator-jhipster\generators\upgrade\index.js:141:26)
    at C:\Users\Andrea\AppData\Local\Yarn\config\global\node_modules\shelljs\src\exec.js:199:9
    at ChildProcess.exithandler (child_process.js:262:7)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:921:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

有任何帮助吗? 感谢

1 个答案:

答案 0 :(得分:2)

我也有这个问题,然后有几种方法。我试过这个并且它有效......

打开控制台并进入应用程序的根目录并运行:

jhipster upgrade --target-version=4.6.2

现在你只需回答一些解决合并冲突的问题,如果有的话。

UPDATE 1:这是因为无法在npm中获取jhipster的最后版本号。