Nico
Nico

Reputation: 505

Can't upgrade JHipster from 5.0.1 to 5.1.0

I'm trying to generate new app in empty folder.

$ jhipster
Using JHipster version installed globally
Running default command
Executing jhipster:app
Options: 


        ??? ???   ??? ????????? ????????   ??????? ????????? ????????? ????????
        ??? ???   ??? ????????? ????????? ???????? ????????? ????????? ?????????
        ??? ?????????    ???    ????????? ???????     ???    ???????   ?????????
  ???   ??? ?????????    ???    ????????   ???????    ???    ???????   ????????
  ????????? ???   ??? ????????? ???       ????????    ???    ????????? ???  ????
   ???????  ???   ??? ????????? ???       ???????     ???    ????????? ???   ???

                            https://www.jhipster.tech

Welcome to JHipster v5.0.1
Application files will be generated in folder: /home/eclipse-workspace/jhtest
 _______________________________________________________________________________________________________________

  Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
  If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
 _______________________________________________________________________________________________________________

 ______________________________________________________________________________

  JHipster update available: 5.1.0 (current: 5.0.1)

  Run yarn global upgrade generator-jhipster to update.

So I canceled this and try:

$ yarn global upgrade generator-jhipster
yarn global v1.7.0
error Outdated lockfile. Please run `yarn install` and try again.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.

Then:

$ yarn install
yarn install v1.7.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.06s.

It creates node_modules folder and yarn.lock file but

$ yarn global upgrade generator-jhipster

generates error Outdated lockfile as above. What I missed?

Upvotes: 2

Views: 613

Answers (1)

Jon Ruddell
Jon Ruddell

Reputation: 6352

This happens when you mix NPM and Yarn global packages.

To fix, remove from both npm and yarn:

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

Then install with one or the other:

yarn global add generator-jhipster

Upvotes: 3

Related Questions