Upgrading from 4.5.3 to 4.6.2

119 views
Skip to first unread message

Matt Raible

unread,
Aug 7, 2017, 5:44:13 PM8/7/17
to JHipster dev team
Hey all,

I’m trying to update the 21-Points Health app from 4.5.3 (what I developed it with) to 4.6.2 (the latest release). It’s failing with a strange error:

$ jhipster upgrade
...
ERROR in ./~/css-loader!./~/postcss-loader!./~/sass-loader/lib/loader.js!./src/main/webapp/content/scss/vendor.scss
Module build failed: TypeError: Invalid PostCSS Plugin found: [0]
at /Users/mraible/dev/21-points/node_modules/postcss-load-plugins/lib/plugins.js:32:17
at Array.forEach (native)
at plugins (/Users/mraible/dev/21-points/node_modules/postcss-load-plugins/lib/plugins.js:21:15)
at /Users/mraible/dev/21-points/node_modules/postcss-load-config/index.js:64:18
@ ./src/main/webapp/content/scss/vendor.scss 4:14-194
@ ./src/main/webapp/app/vendor.ts
@ dll vendor
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
warning generator-jhipster > ch...@2.0.1: Please upgrade to Chalk 2.1.0 - template literals in this version (2.0.1) are quite buggy.
warning browser-sync > localtunnel > request > node...@1.4.8: Use uuid module instead
warning "angular...@1.2.6" has incorrect peer dependency "@angular/common@^2.0.0".
warning "angular...@1.2.6" has incorrect peer dependency "@angular/core@^2.0.0".
warning "ng2-tr...@4.2.0" has incorrect peer dependency "@angular/core@^2.0.0".
warning "ng2-tr...@4.2.0" has incorrect peer dependency "@angular/http@^2.0.0".
Warning: Can't resolve all parameters for AlertService in /Users/mraible/dev/21-points/node_modules/ng-jhipster/src/service/alert.service.d.ts: ([object Object], ?, [object Object]). This will become an error in Angular v5.x
error Command failed with exit code 2.
error Command failed with exit code 1.

at Environment.error (/Users/mraible/.nvm/versions/node/v6.11.0/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/lib/environment.js:140:40)
at constructor.error (/Users/mraible/.nvm/versions/node/v6.11.0/lib/node_modules/generator-jhipster/generators/generator-base.js:1610:18)
at shelljs.exec (/Users/mraible/.nvm/versions/node/v6.11.0/lib/node_modules/generator-jhipster/generators/upgrade/index.js:278:27)
at /Users/mraible/.nvm/versions/node/v6.11.0/lib/node_modules/generator-jhipster/node_modules/shelljs/src/exec.js:204:9
at ChildProcess.exithandler (child_process.js:211:5)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
[mraible:~/dev/21-points] jhipster_upgrade(+4/-4) 2m15s 1 $

$ which jhipster
/Users/mraible/.nvm/versions/node/v6.11.0/bin/jhipster


Any ideas what might be causing this? I’d like to show off the upgrade sub-gen, but can show how to manually upgrade too.

Cheers,

Matt

Matt Raible

unread,
Aug 7, 2017, 6:08:14 PM8/7/17
to JHipster dev team
I googled a bit and found a suggestion on SO to upgrade postcss-loader to 1.3.3. https://stackoverflow.com/a/45523392/65681

This got me a bit further, but still errors out.

Updating generator-jhipster to 4.6.2 . This might take some time...
Updated generator-jhipster to version 4.6.2
Error jhipster:upgrade

ERROR! Unable to checkout branch jhipster_upgrade:
error: Your local changes to the following files would be overwritten by checkout:
package.json
Please commit your changes or stash them before you switch branches.
Aborting

Reading the docs, it looks like the upgrade sub-gen might’ve been fixed in 4.5.6? https://jhipster.github.io/2017/06/23/jhipster-release-4.5.6.html

Thanks,

Matt

Deepu K Sasidharan

unread,
Aug 8, 2017, 2:18:05 AM8/8/17
to Matt Raible, JHipster dev team
You could try to manually upgrade to the version which fixes upgrade first and then show upgrade from that I guess. 

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev+unsubscribe@googlegroups.com.
To post to this group, send email to jhipst...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/CDB5A97C-D685-43BA-A589-F526FCD933D9%40raibledesigns.com.
For more options, visit https://groups.google.com/d/optout.

Gaël Marziou

unread,
Aug 8, 2017, 7:35:38 AM8/8/17
to JHipster dev team
When I run `jhipster upgrade`, I'm never sure which version is the actual code orchestrating the upgrade steps.


I tend to think that if my project is in 4.5.3, `jhipster upgrade` will run upgrade code from 4.5.3 which checks if there is a newer version and then generate app in 2 versions but the problem for me is if the upgrade sub gen was wrong in 4.5.3, upgrade will fail.

So, if I'm correct the workflow is missing a first step which is to install target version locally and restart in order to run this version of the update. Am I right?

Cheers,
Gael

Gaël Marziou

unread,
Aug 9, 2017, 4:18:05 AM8/9/17
to JHipster dev team
Maybe the upgrade sub gen should be a standalone generator so that it can upgrade any version and be fixed at any time.

In fact, this is related to the global vs local issue of the cli: https://github.com/jhipster/generator-jhipster/issues/6208
Reply all
Reply to author
Forward
0 new messages