jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.46k stars 4.02k forks source link

JHipster Upgrade not working #6023

Closed Drishika closed 7 years ago

Drishika commented 7 years ago
Overview of the issue

I am trying to upgrade jhipster version to 4.4.1. I checked out code that is already on 4.4.1 and ran upgrade command on my machine that is on 4.0.4 to upgrade it to 4.4.1.

However it is failing with the following error.

I used the command as described on the page "jhipster upgrade --target-version=4.4.1".

However it fails after generating the branch and code giving the following error.

To install your dependencies manually, run: yarn install

Running post run module hooks

Server application generated successfully.

Run your Spring Boot application: ./gradlew

Client application generated successfully.

Start your Webpack development server with: yarn start

Running post run module hooks

Error jhipster --with-entities --force --skip-install

You don’t seem to have a generator with the name “jhipster-elasticsearch-reindexer:app” installed. But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/. Install them with npm install generator-jhipster-elasticsearch-reindexer:app.

To see all your installed generators run yo without any arguments. Adding the --help option will also show subgenerators.

If yo cannot find the generator, run yo doctor to troubleshoot your system.

at Environment.error (/Users/Buni/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:89:38) at constructor.error (/Users/Buni/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:1596:18) at shelljs.exec (/Users/Buni/.config/yarn/global/node_modules/generator-jhipster/generators/upgrade/index.js:84:23) at /Users/Buni/.config/yarn/global/node_modules/shelljs/src/exec.js:204:9 at ChildProcess.exithandler (child_process.js:218:5) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:885:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Motivation for or Use Case

I was able to upgrade earlier but now get the error above. I did nom install for the elastic search reindeer but that did not help.

Reproduce the error

Please run the following command

jhipster upgrade --target-version=4.4.1

Related issues
Suggest a Fix
JHipster Version(s)

i am on 4.0.4 trying to upgrade to 4.4.1

JHipster configuration

.yo-rc file

{ "generator-jhipster": { "promptValues": { "packageName": "com.drishika.gradzcircle", "nativeLanguage": "en" }, "jhipsterVersion": "4.4.1", "baseName": "gradzcircle", "packageName": "com.drishika.gradzcircle", "packageFolder": "com/drishika/gradzcircle", "serverPort": "8080", "authenticationType": "jwt", "hibernateCache": "ehcache", "clusteredHttpSession": false, "websocket": false, "databaseType": "sql", "devDatabaseType": "postgresql", "prodDatabaseType": "postgresql", "searchEngine": "elasticsearch", "messageBroker": false, "serviceDiscoveryType": "eureka", "buildTool": "gradle", "enableSocialSignIn": true, "jwtSecretKey": "5482eb4f18bb056e37ed636bcf6cd42cf7b31266", "clientFramework": "angular2", "useSass": false, "clientPackageManager": "yarn", "applicationType": "monolith", "testFrameworks": [ "gatling", "cucumber", "protractor" ], "jhiPrefix": "jhi", "enableTranslation": true, "nativeLanguage": "en", "languages": [ "en", "hi" ] } }

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

I am on MacOs Sierra

jdubois commented 7 years ago

This ticket has been closed as the guidelines are not followed.

Tickets must follow our Guidelines, as mentioned in:

  1. our Readme file on the front page of the project,
  2. the "create a new ticket" page and
  3. our Help page

We have also created a template on the "create a new ticket" page to help you follow those guidelines.

Drishika commented 7 years ago

Updated as per the format

jdubois commented 7 years ago

It does say:

You don’t seem to have a generator with the name “jhipster-elasticsearch-reindexer:app” installed.
But help is on the way:

You can see available generators via npm search yeoman-generator or via http://yeoman.io/generators/.
Install them with npm install generator-jhipster-elasticsearch-reindexer:app.

So I guess you need to install that module before. Please note that modules are third-party applications, so we do not support them.

Drishika commented 7 years ago

I tried installing the reindexer app but get the following

? 'Allo Abhinav! What would you like to do? Install a generator ? Search npm for generators: jhipster-elasticsearch-reindexer

 _-----_     ╭───────────────────────╮
|       |    │      Bye from us!     │
|--(o)--|    │       Chat soon.      │

---------´ │ Yeoman team │ ( _´U_ ) │ http://yeoman.io │ /A\ /╰───────────────────────╯ | ~ |
__'._.'
´ |° ´ Y

ParseError at /usr/local/lib/node_modules/yo/node_modules/got/index.js:115:12 at BufferStream. (/usr/local/lib/node_modules/yo/node_modules/read-all-stream/index.js:64:3) at emitNone (events.js:91:20) at BufferStream.emit (events.js:185:7) at finishMaybe (/usr/local/lib/node_modules/yo/node_modules/readable-stream/lib/_stream_writable.js:485:14) at afterWrite (/usr/local/lib/node_modules/yo/node_modules/readable-stream/lib/_stream_writable.js:367:3) at _combinedTickCallback (internal/process/next_tick.js:80:20) at process._tickCallback (internal/process/next_tick.js:98:9)

jdubois commented 7 years ago

You probably have an error in Yeoman or in that module, can you check on their bug tracker? We can't support other tools, this bug tracker is just for JHipster.

Drishika commented 7 years ago

I was able to progress but now am stuck with this

https://github.com/jhipster/generator-jhipster/issues/5883

I am trying the suggestion by tan9 to remove jhipster generator from yarn global but am unable to execute using alias but am unable to run jhipster upgrade. I get command not found which basically means am unable to set the path.

I am struggling for the past2 hours to understand where jhipster lives in node now that i removed it from yarn global.

Please help !!

Drishika commented 7 years ago

i don't mean t spam you.... but below is what the happening error trace...

Abhinavs-MacBook-Pro:gradzcircle_java_app Buni$ jhipster upgrade Executing jhipster:upgrade 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... New generator-jhipster version found: 4.5.6 Git repository detected Created branch jhipster_upgrade Cleaned up directory Installing JHipster 4.4.1 locally Installed generator-jhipster@4.4.1 Regenerating application with JHipster 4.4.1... Successfully regenerated application with JHipster 4.4.1 Committed with message "Generated with JHipster 4.4.1" Checked out branch "master" Current code has been generated with version 4.4.1 Checked out branch "jhipster_upgrade" Updating generator-jhipster to 4.5.6 . This might take some time... Updated generator-jhipster to version 4.5.6 Cleaned up directory Regenerating application with JHipster 4.5.6... Successfully regenerated application with JHipster 4.5.6 Committed with message "Generated with JHipster 4.5.6" Checked out branch "master" Merging changes back to master... Merge done! Installing dependencies, please wait... events.js:160 throw er; // Unhandled 'error' event ^

Error: ERROR! yarn failed. at Environment.error (/Users/Buni/.config/yarn/global/node_modules/yeoman-environment/lib/environment.js:89:38) at constructor.error (/Users/Buni/.config/yarn/global/node_modules/generator-jhipster/generators/generator-base.js:1596:18) at shelljs.exec (/Users/Buni/.config/yarn/global/node_modules/generator-jhipster/generators/upgrade/index.js:309:26) at /Users/Buni/.config/yarn/global/node_modules/shelljs/src/exec.js:204:9 at ChildProcess.exithandler (child_process.js:218:5) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:885:16) at Socket. (internal/child_process.js:334:11) at emitOne (events.js:96:13)

deepu105 commented 7 years ago

Seems like its failing on yarn install can you try to run yarn install manually and see if it works well?

Drishika commented 7 years ago

I tried installing yarn manually works but the automated upgrade process still fails.

I eventually went the manual route. Thanks for the help.

n0rtan commented 7 years ago

Have the same result.

TranQuangTienSA commented 7 years ago

Did you have conflict on package.json file?

n0rtan commented 7 years ago

No. If I install clean project and run forced upgrade, I will get this error too.

TranQuangTienSA commented 7 years ago

Could you run yo jhipster:info in your project, and give me the console output?