Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JHipster Upgrade not working #6023

Closed
1 task
Drishika opened this issue Jul 3, 2017 · 13 comments
Closed
1 task

JHipster Upgrade not working #6023

Drishika opened this issue Jul 3, 2017 · 13 comments

Comments

@Drishika
Copy link

Drishika commented Jul 3, 2017

  • Please follow the issue template below for bug reports and feature requests.
  • If you have a support request rather than a bug please use stackoverflow with the JHipster tag.
  • For bug reports its mandatory to paste the result of command jhipster info run in your project root folder.
  • Tickets opened without any of these pieces of information will be closed without any explanation.
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

  • Checking this box is mandatory (this is just to show you read everything)
@jdubois
Copy link
Member

jdubois commented Jul 3, 2017

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.

@jdubois jdubois closed this as completed Jul 3, 2017
@Drishika
Copy link
Author

Drishika commented Jul 4, 2017

Updated as per the format

@jdubois jdubois reopened this Jul 4, 2017
@jdubois
Copy link
Member

jdubois commented Jul 4, 2017

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.

@jdubois jdubois closed this as completed Jul 4, 2017
@Drishika
Copy link
Author

Drishika commented Jul 4, 2017

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
Copy link
Member

jdubois commented Jul 4, 2017

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
Copy link
Author

Drishika commented Jul 4, 2017

I was able to progress but now am stuck with this

#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
Copy link
Author

Drishika commented Jul 4, 2017

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 [email protected]
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
Copy link
Member

deepu105 commented Jul 4, 2017

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

@Drishika
Copy link
Author

Drishika commented Jul 5, 2017

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

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

@n0rtan
Copy link

n0rtan commented Jul 5, 2017

Have the same result.

@TranQuangTienSA
Copy link
Contributor

Did you have conflict on package.json file?

@n0rtan
Copy link

n0rtan commented Jul 5, 2017

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

@TranQuangTienSA
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants