Overview of the issue
Upgrading a khipster application using 'khipster upgrade' fails.
I get the following error:
....
Looking for latest generator-jhipster-kotlin version...
1.12.1
ERROR! Invalid Version: undefined
....
Motivation for or Use Case
Like to upgrade my bigger khipster application to 1.12.1. Unfortunately I have many problems getting that done.
To investigate the basics I wanted to check if a newly generated khipster app can be upgraded without errors.
Reproduce the error
npm install -g generator-jhipster-kotlin
mkdir test
cd test
git init
khipster
... Answer the questions (see below for .yo-rc.json)
basically keep defaults; only changes: grades and react ..
git add .
git commit -am "initial creation"
khipster upgrade
This results in
INFO! Using JHipster version installed globally
INFO! No custom sharedOptions found within blueprint: generator-jhipster-kotlin at /Users/user/Development/upgrade/test/node_modules/generator-jhipster-kotlin
INFO! No custom commands found within blueprint: generator-jhipster-kotlin at /Users/user/Development/upgrade/test/node_modules/generator-jhipster-kotlin
Welcome to the JHipster Upgrade Sub-Generator
This will upgrade your current application codebase to the latest JHipster version
โ Checking for new blueprint versions
Looking for latest generator-jhipster-kotlin version...
1.12.1
ERROR! Invalid Version: undefined
TypeError: Invalid Version: undefined
at new SemVer (/Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/semver/classes/semver.js:19:13)
at compare (/Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/semver/functions/compare.js:3:3)
at Object.lt (/Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/node_modules/semver/functions/lt.js:2:29)
at /Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/upgrade/index.js:263:28
at new Promise ()
at /Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/upgrade/index.js:260:22
at Array.map ()
at module.exports.checkLatestBlueprintVersions (/Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/generator-jhipster/generators/upgrade/index.js:259:14)
at Object. (/Users/user/.nvm/versions/node/v14.17.0/lib/node_modules/generator-jhipster-kotlin/node_modules/yeoman-generator/lib/index.js:1009:25)
Related issues
Link to PR (if any)
KHipster Version(s)
1.12.1
- [x] Checking this box is mandatory (this is just to show you read everything)
.yo-rc.json
{
"generator-jhipster": {
"blueprints": [
{
"name": "generator-jhipster-kotlin",
"version": "1.12.1"
}
],
"otherModules": [
{
"name": "generator-jhipster-kotlin",
"version": "1.12.1"
}
],
"applicationType": "monolith",
"baseName": "test",
"jhipsterVersion": "7.0.1",
"skipClient": false,
"skipServer": false,
"skipUserManagement": false,
"skipCheckLengthOfIdentifier": false,
"skipFakeData": false,
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"testFrameworks": [],
"pages": [],
"creationTimestamp": 1624602504902,
"serviceDiscoveryType": false,
"reactive": false,
"authenticationType": "jwt",
"packageName": "com.mycompany.myapp",
"serverPort": "8080",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"buildTool": "gradle",
"serverSideOptions": [],
"websocket": false,
"searchEngine": false,
"messageBroker": false,
"enableSwaggerCodegen": false,
"clientFramework": "react",
"withAdminUi": true,
"clientTheme": "none",
"enableTranslation": true,
"nativeLanguage": "en",
"packageFolder": "com/mycompany/myapp",
"jwtSecretKey": "YTEwMzFlZGM3NDA0ZTNlOWM0OWI2ZmY3MmUwZjdhNDYyN2RkYmUyZWM2YWEzZTZkOGUyNWVmYTdkN2RhYTIxNDk4YmY0YzdiM2Y0MzU0MWRmYTM4NzJjYTA3NmY1ODkxYWJjMDE5ZTViZDVjMDZiODJlYTFjMGU3MzIwZWFjZTY=",
"clientPackageManager": "npm",
"clientThemeVariant": "",
"languages": ["en"]
}
}