无法升级到Jhipster

无法升级到Jhipster

本文介绍了无法升级到Jhipster 5.3.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在"yarn global upgrade generator-jhipster"之后,该版本为4.14.5,而不是最新版本5.3.4.为什么?

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

我的节点版本是8.11.1,yarn是1.3.2.

My node version is 8.11.1, yarn is 1.3.2.

推荐答案

2种可能性:

  • 运行jhipster --version时,如果您在生成的项目中,它将打印本地版本(从本地node_modules文件夹),这使项目彼此隔离.在这种情况下,您必须使用jhipster upgrade
  • 升级项目
  • 当您不在生成的项目中时,jhipster --version会打印全局安装的版本,这可能意味着您已经安装了jhipster两次(一次是用yarn一次,一次是使用npm)
  • 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)

通常,双重全局安装的修补程序是从npm卸载并进行yarn,然后与另一个重新安装:

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

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

只需npm即可安装

npm install -g generator-jhipster

由于 JHipster 5.3.0 npm现在是默认的客户端程序包管理器,而不是Yarn.

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

jhipster --version
Using JHipster version installed globally
5.3.4

这篇关于无法升级到Jhipster 5.3.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:01