Cannot upgrade to jhipster 5.3.4

孤者浪人 提交于 2019-12-24 07:58:29

问题


After "yarn global upgrade generator-jhipster", the version is 4.14.5 instead of latest version 5.3.4. why?

My node version is 8.11.1, yarn is 1.3.2.


回答1:


2 possibilities:

  • when you run jhipster --version it prints local version (from local node_modules folder) if your are in a generated project, this enables projects to isolate from each others. In this case you must upgrade the project with jhipster upgrade
  • when you are not in a generated project, jhipster --version prints globally installed version and it probably means that you have installed jhipster twice (once with yarn and once with npm)

Usually the fix to double global installation is to uninstall from npm and yarn then reinstall with one or the other:

Remove from both yarn and npm

yarn global remove generator-jhipster
npm uninstall -g generator-jhipster

Install with just npm

npm install -g generator-jhipster

Since JHipster 5.3.0 npm is now the default client package manager, instead of Yarn.

Check version

jhipster --version
Using JHipster version installed globally
5.3.4



回答2:


Right tick answer didn't work for me, which describe following steps:

  1. yarn global remove generator-jhipster
  2. npm uninstall -g generator-jhipster
  3. npm install -g generator-jhipster

In my case I removed all mode modules & node itself, then fresh installation of jhipster worked for me.



来源:https://stackoverflow.com/questions/52489935/cannot-upgrade-to-jhipster-5-3-4

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