Open FurmanSK opened 2 weeks ago
Here's my package.json on the jhipster_migrate_source branch after generating the code. This is just the angular parts.
"dependencies": {
"@angular/common": "13.3.1",
"@angular/compiler": "13.3.1",
"@angular/core": "13.3.1",
"@angular/forms": "13.3.1",
"@angular/localize": "13.3.1",
"@angular/platform-browser": "13.3.1",
"@angular/platform-browser-dynamic": "13.3.1",
"@angular/router": "13.3.1",
"...": "..."
}
Here it is on the jhipster_upgrade branch that shows migration before merging back in. The devDependencies section is all it is showing that was changed from 7.8.1 to 7.9.4. Angular is still 13
"dependencies": {
"@angular/common": "13.3.1",
"@angular/compiler": "13.3.1",
"@angular/core": "13.3.1",
"@angular/forms": "13.3.1",
"@angular/localize": "13.3.1",
"@angular/platform-browser": "13.3.1",
"@angular/platform-browser-dynamic": "13.3.1",
"@angular/router": "13.3.1",
}
"devDependencies": {
"generator-jhipster": "7.9.4",
"husky": "7.0.4",
"lint-staged": "13.0.3",
"prettier": "2.7.1",
"prettier-plugin-java": "1.6.2",
"prettier-plugin-packagejson": "2.2.18"
}
Here is the sample project that used my same actual project JDL file. It is also on another system (Linux x86 vs my actual project source is on my work laptop which is a M2 Macbook pro). As you can see, it actually upgraded the right bits. Could this be a problem with node arm64 vs x86 versions? Doubt it but just a thought.
I noticed after doing even a manual upgrade, it sets "clientFramework": "no"
. Could this be an issue?
{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "****",
"blueprints": [],
"buildTool": "maven",
"cacheProvider": "ehcache",
"clientFramework": "no",
"clientPackageManager": "npm",
"clientTheme": "none",
"clientThemeVariant": "",
"creationTimestamp": 1649702719937,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"devServerPort": 4200,
"dtoSuffix": "DTO",
"enableGradleEnterprise": false,
"enableHibernateCache": true,
"enableSwaggerCodegen": false,
"enableTranslation": false,
"entities": [
***
],
"entitySuffix": "",
"jhiPrefix": "jhi",
"jhipsterVersion": "7.9.4",
"jwtSecretKey": "",
"languages": ["en"],
"lastLiquibaseTimestamp": 1657126303000,
"messageBroker": false,
"nativeLanguage": "en",
"otherModules": [],
"packageName": "***.***.****",
"pages": [],
"prodDatabaseType": "mysql",
"reactive": false,
"searchEngine": false,
"serverPort": "8080",
"serverSideOptions": [],
"serviceDiscoveryType": "no",
"skipCheckLengthOfIdentifier": false,
"skipClient": true,
"skipFakeData": false,
"skipUserManagement": false,
"testFrameworks": [],
"websocket": false,
"withAdminUi": true
}
}
I see that skipClient was set to true, not sure how that happened but pulled from my develop branch back into test upgrade branch so its set to false, after going through the upgrade again, half way through when it is on the target branch it still overrides it back to true. I set it to false when it asked for configuration changes and still is not working. I see on the target branch that it did generate the 14.x angular in package.json but when it merged it back in, the package.json was back to 13.x. Also noticed that the 7.8.1 source branch had its .yo-rc.json file also set the skiClient to true again. Do I have to turn it back to false when doing this migrate? Why is it overriding this from what is in our .yo-rc.json file?
Also, when I do the jhipster-migrate --verbose command, when its ready to merge target back in, it complains about husky stuff not being there. It's the _/*.sh script that is missing. Why is this? I go in and make sure husky is installed, then run npx husky install to get around this.
@mshima Any idea why this is happening?
In configuration file, clientFramework
should have value angularX
and skipClient
should be false
.
Agreed. Some reason they would both be changed to no and true. I also noticed in the .jhipster folder all the json values had that skipClient attribute which I had no idea was even there. I removed that from each one, well I deleted them all and re-imported the JDL file and seems to be getting me on the right path. I'll find out more today. My issue with this, is if I set these flags while running it to override the skipclient attribute, why is it not listening?
Tried to use the jhipster-migrate blueprint multiple times. Tried deleting the node_modules/generator-jhipster half way through the migrate since it asks when to start the target verseion. Deleted it to just be sure it uses the right version. Tried uninstalling generators globally and also deleting node_modules and starting on fresh npm install. Same result.
I went through all the documentation, when trying to upgrade my jhipster project that is on 7.8.1, using the jhipster-migrate --verbose blueprint, it gets to the target branch and the package.json is showing 7.9.4 for the generator, but the angular versions are all still 13.x which is the same as 7.8.1. I am taking this slow as to not wanting to jump to 8.x yet on jhipster. I tried this with a sample project and my actual JDL file and it worked, although not easy but still worked. Any tips or pointers for fixing this? I have tried it too many times to count. I even tried manually and it doesn't work. Could there be something bugged in my repo?
Was told over on stack overflow to add an issue here.
Edit: Node version is 18.x (via nvm) since 16.x doesn't work with the migrate blueprint. latest 1.5 version of this blueprint I also tried to just manually upgrade, and it still doesn't work. Leaves out all the angular code completely even if forced. And if I change the clientFramework to angularX as it was before, it just overwrites it back to no. Not sure what is going on here.