将 jhipster 从 v5.0.1 升级到最新
Posted
技术标签:
【中文标题】将 jhipster 从 v5.0.1 升级到最新【英文标题】:Upgrading jhipster from v5.0.1 to the latest 【发布时间】:2019-12-30 04:37:02 【问题描述】:我正在运行 linux 18.04,安装了 java 8。我正在努力将当前版本的 jhipster (v5.0.1) 升级到最新版本。我用过,哟,yarn 和 npm 都没有成功。
使用 npm 我得到下面的错误,你得到 [subsequent] 错误:
Using JHipster version installed globally Executing jhipster:upgradeOptions:
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
events.js:174
throw er; // Unhandled 'error' event
^
Error: ERROR! Current directory does not contain a JHipster project.
at Environment.error (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:157:40)
at module.exports.error (/usr/lib/node_modules/generator-jhipster/generators/generator-base.js:1981:18)
at module.exports.assertJHipsterProject (/usr/lib/node_modules/generator-jhipster/generators/upgrade/index.js:144:26)
at Object.<anonymous> (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:399:25)
at /usr/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:25:25
at new Promise (<anonymous>)
at /usr/lib/node_modules/generator-jhipster/node_modules/run-async/index.js:24:19
at self.env.runLoop.add.completed (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:400:11)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
Emitted 'error' event at:
at Immediate.setImmediate (/usr/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/lib/index.js:406:18)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
[后续]
? Generators to update (Press <space> to select, <a> to toggle all, <i> to invert selection)generator-jhipster
Unhandled rejection Error: EACCES: permission denied, open '/home/lelo/.npm/_cacache/index-v5/ad/54/831265f841b3fd278d23c4c96b06a32656a62c88fddaa7739f419602a04d'
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/lelo/.npm/_logs/2019-08-25T22_22_40_369Z-debug.log```
尽管有任何用户类型,但我没有得到预期的输出,即 jhipster 的升级版本。我可能做错了什么?
【问题讨论】:
你不应该使用哟,只有在项目目录中的jhipster upgrade
。您的项目是否满足升级要求?它应该有一个 git repo,其中包含一个 .yo-rc.json
文件和一个 .jhipster
目录。
【参考方案1】:
确保您位于应用程序目录中并安装了 git。
然后执行jhipster upgrade。
您可能需要解决在更新过程中产生的合并问题。
更多信息:https://www.jhipster.tech/upgrading-an-application/
【讨论】:
以上是关于将 jhipster 从 v5.0.1 升级到最新的主要内容,如果未能解决你的问题,请参考以下文章
Composer 没有安装最新的 Laravel (5.0.15)