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

Error upgrading from 8.7.0 to 8.7.1 using automatic upgrade. #27849

Open
1 task done
hizmarck opened this issue Nov 9, 2024 · 1 comment
Open
1 task done

Error upgrading from 8.7.0 to 8.7.1 using automatic upgrade. #27849

hizmarck opened this issue Nov 9, 2024 · 1 comment

Comments

@hizmarck
Copy link

hizmarck commented Nov 9, 2024

Overview of the issue

I was upgrading a tiny application, and I have only added a few entities. My application was over the 8.1.0 generator. I was having a problem upgrading it with: jhipster upgrade, but after a few days, I luckily could upgrade to 8.7.0 using the same command, for my case worked removing the jhipster_upgrade branch (maybe at some point a corrupted it), well I started to update over each version, I mean, from 8.1.0 to 8.2.1, then the next one, and so until reaching the 8.7.1 when I got the error.

My steps for each step were the same:

  • check if support for some node versions exists for the new release. If that is the case set this version.
  • remove the jhipster_upgrade branch if exists (idk if that should be necessary but it worked for me until 8.7.1 as I already mentioned).
  • install the target generator version globally.
  • execute the upgrade command
Motivation for or Use Case

I think that without a change in my code, if I can upgrade from 8.1.0 to 8.7.0, the same should work for the next 8.7.1?

Reproduce the error

This is the error log:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: [email protected]
npm error Found: @angular-devkit/[email protected]
npm error node_modules/@angular-devkit/build-angular
npm error   dev @angular-devkit/build-angular@"18.2.1" from the root project
npm error   @angular-devkit/build-angular@"^18.0.0" from @angular-builders/[email protected]
npm error   node_modules/@angular-builders/custom-webpack
npm error     dev @angular-builders/custom-webpack@"18.0.0" from the root project
npm error   3 more (@angular-builders/jest, jest-preset-angular, jest-preset-angular)
npm error
npm error Could not resolve dependency:
npm error dev @angular-devkit/build-angular@"18.2.1" from the root project
npm error
npm error Conflicting peer dependency: @angular/[email protected]
npm error node_modules/@angular/compiler
npm error   peer @angular/compiler@"18.2.1" from @angular/[email protected]
npm error   node_modules/@angular/localize
npm error     @angular/localize@"18.2.1" from the root project
npm error     peerOptional @angular/localize@"^18.0.0" from @angular-devkit/[email protected]
npm error     node_modules/@angular-devkit/build-angular
npm error       dev @angular-devkit/build-angular@"18.2.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry

[email protected] /mnt/hizmarck/hiz_data/workspace/java/test
└── (empty)



##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**


<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "test",
    "buildTool": "gradle",
    "cacheProvider": null,
    "clientFramework": "angular",
    "clientTestFrameworks": [
      "cypress"
    ],
    "clientTheme": "lumen",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1700790003842,
    "cypressAudit": false,
    "cypressCoverage": true,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 4200,
    "enableGradleEnterprise": null,
    "enableHibernateCache": null,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [
      "TaxPayer",
      "Address",
      "SatCAduana",
      "SatCClaveUnidad",
      "SatCMoneda",
      "SatCClaveProdServ",
      "SatCCodigoPostal",
      "SatCPais",
      "SatCClaveUnidadPeso",
      "SatCSubTipoRem",
      "SatCLocalidad",
      "SatCMaterialPeligroso",
      "SatCMunicipio",
      "SatCTipoEmbalaje",
      "SatCTipoPermisoAtf",
      "SatCClaveProdServCcp",
      "SatCClaveColonia",
      "SatCConfigAutotransporte",
      "ProdServ"
    ],
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.7.0",
    "languages": [
      "en",
      "fr",
      "es"
    ],
    "lastLiquibaseTimestamp": 1720541949000,
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "en",
    "packageName": "com.test",
    "prodDatabaseType": "postgresql",
    "reactive": true,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [],
    "serviceDiscoveryType": false,
    "skipClient": false,
    "skipFakeData": true,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": false,
    "withAdminUi": true
  }
}
</pre>
</details>


##### **Environment and Tools**

openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

git version 2.43.0

node: v20.17.0
npm: 10.8.2

Docker version 27.3.1, build ce12230

##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>
@ChangelogDate("20240617220914")
entity TaxPayer {
  name String required
  rfc String required
  notificationEmail String
  type TaxPayerType
}
@ChangelogDate("20240617220916")
entity Address {
  streetName String required
  neighborhoodSubdivision String required
  municipalityBoxrough String required
  cityLocality String required
  state String required
  postalCode String required
  reference String
}
@ChangelogDate("20240708223004")
@SkipClient
entity SatCAduana (sat_c_aduana) {
  cAduana String required maxlength(5)
  descripcion String required maxlength(255)
  activo Boolean
}
@ChangelogDate("20240709002108")
entity SatCClaveUnidad (sat_c_clave_unidad) {
  cUnidad String required maxlength(5)
  nombre String required maxlength(255)
  simbolo String maxlength(25)
  activo Boolean
}
@ChangelogDate("20240709002109")
@SkipClient
entity SatCMoneda (sat_c_moneda) {
  cMoneda String required maxlength(10)
  descripcion String required maxlength(255)
  decimales Integer
  activo Boolean
}
@ChangelogDate("20240709002110")
entity SatCClaveProdServ (sat_c_clave_prod_serv) {
  cProdServ String required maxlength(8)
  descripcion String required maxlength(255)
  incluirIva String required maxlength(10)
  incluirIeps String required maxlength(10)
  complementoAIncluir String required maxlength(100)
  estimuloFranja BigDecimal required
  activo Boolean required
}
@ChangelogDate("20240709002111")
@SkipClient
entity SatCCodigoPostal (sat_c_codigo_postal) {
  cCp String required maxlength(5)
  cEstado String maxlength(5)
  cMunicipio String maxlength(5)
  cLocalidad String maxlength(5)
  activo Boolean
}
@ChangelogDate("20240709002112")
@SkipClient
entity SatCPais (sat_c_pais) {
  cPais String required maxlength(5)
  descripcion String required maxlength(255)
}
@ChangelogDate("20240709002113")
@SkipClient
entity SatCClaveUnidadPeso (sat_c_clave_unidad_peso) {
  cUnidadPeso String required maxlength(7)
  nombre String required maxlength(255)
  descripcion String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002114")
@SkipClient
entity SatCSubTipoRem (sat_c_sub_tipo_rem) {
  cTipoRemolque String required maxlength(7)
  remolque String required maxlength(80)
  activo Boolean required
}
@ChangelogDate("20240709002115")
@SkipClient
entity SatCLocalidad (sat_c_localidad) {
  cLocalidad String required maxlength(4)
  estado String required maxlength(5)
  descripcion String required maxlength(50)
  activo Boolean required
}
@ChangelogDate("20240709002116")
@SkipClient
entity SatCMaterialPeligroso (sat_c_material_peligroso) {
  cMatPeligroso String required maxlength(6)
  descripcion String required maxlength(255)
  claseODiv String required maxlength(10)
  peligroSecundario String required maxlength(10)
  nombreTecnico String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002117")
@SkipClient
entity SatCMunicipio (sat_c_municipio) {
  cMunicipio String required maxlength(4)
  estado String required maxlength(5)
  descripcion String required maxlength(50)
  activo Boolean required
}
@ChangelogDate("20240709002118")
@SkipClient
entity SatCTipoEmbalaje (sat_c_tipo_embalaje) {
  cEmbalaje String required maxlength(6)
  descripcion String required maxlength(140)
  activo Boolean required
}
@ChangelogDate("20240709002119")
@SkipClient
entity SatCTipoPermisoAtf (sat_c_tipo_permiso_atf) {
  cPermiso String required maxlength(8)
  descripcion String required maxlength(150)
  activo Boolean required
}
@ChangelogDate("20240709002120")
@SkipClient
entity SatCClaveProdServCcp (sat_c_clave_prod_serv_ccp) {
  cProdServ String required maxlength(8)
  descripcion String required maxlength(140)
  palabrasSimilares String required maxlength(255)
  materialPeligroso String required maxlength(4)
  activo Boolean required
}
@ChangelogDate("20240709002121")
@SkipClient
entity SatCClaveColonia (sat_c_clave_colonia) {
  cColonia String required maxlength(6)
  codigoPostal String required maxlength(5)
  colonia String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002122")
@SkipClient
entity SatCConfigAutotransporte (sat_c_config_autotransporte) {
  cConfAtf String required maxlength(8)
  descripcion String required maxlength(255)
  numEjes Integer required
  numLlantas String required maxlength(10)
  remolque String required maxlength(3)
  activo Boolean
}
@ChangelogDate("20240709161909")
entity ProdServ {
  code String required
  description String required
  um String required
  price BigDecimal required
}

enum TaxPayerType {
  NP,
  LE
}

relationship OneToOne {
  TaxPayer{address required} to Address
}
relationship ManyToOne {
  ProdServ{satCode required} to SatCClaveProdServ
  ProdServ{satUM required} to SatCClaveUnidad
}

service TaxPayer, Address, SatCAduana, SatCClaveUnidad, SatCMoneda, SatCClaveProdServ, SatCCodigoPostal, SatCPais, SatCClaveUnidadPeso, SatCSubTipoRem, SatCLocalidad, SatCMaterialPeligroso, SatCMunicipio, SatCTipoEmbalaje, SatCTipoPermisoAtf, SatCClaveProdServCcp, SatCClaveColonia, SatCConfigAutotransporte, ProdServ with serviceImpl
search TaxPayer, Address, SatCAduana, SatCClaveUnidad, SatCMoneda, SatCClaveProdServ, SatCCodigoPostal, SatCPais, SatCClaveUnidadPeso, SatCSubTipoRem, SatCLocalidad, SatCMaterialPeligroso, SatCMunicipio, SatCTipoEmbalaje, SatCTipoPermisoAtf, SatCClaveProdServCcp, SatCClaveColonia, SatCConfigAutotransporte, ProdServ with no

</pre>
</details>
Related issues
Suggest a Fix
JHipster Version(s)

8.7.1 (target) but 8.7.0 (before to start the upgrade command)

JHipster configuration

To provide all information we need, you should run jhipster info in the project root folder (or workspaces root for microservices), and
copy/paste the result here.
jhipster info removes sentitive information like rememberKey, jwtSecretKey. Double check if there is any other sensitive info.

As alternative you can add a JDL wrapped in below structure

[email protected] /mnt/hizmarck/hiz_data/workspace/java/test
└── (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "test",
    "buildTool": "gradle",
    "cacheProvider": null,
    "clientFramework": "angular",
    "clientTestFrameworks": [
      "cypress"
    ],
    "clientTheme": "lumen",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1700790003842,
    "cypressAudit": false,
    "cypressCoverage": true,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 4200,
    "enableGradleEnterprise": null,
    "enableHibernateCache": null,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": [
      "TaxPayer",
      "Address",
      "SatCAduana",
      "SatCClaveUnidad",
      "SatCMoneda",
      "SatCClaveProdServ",
      "SatCCodigoPostal",
      "SatCPais",
      "SatCClaveUnidadPeso",
      "SatCSubTipoRem",
      "SatCLocalidad",
      "SatCMaterialPeligroso",
      "SatCMunicipio",
      "SatCTipoEmbalaje",
      "SatCTipoPermisoAtf",
      "SatCClaveProdServCcp",
      "SatCClaveColonia",
      "SatCConfigAutotransporte",
      "ProdServ"
    ],
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.7.0",
    "languages": [
      "en",
      "fr",
      "es"
    ],
    "lastLiquibaseTimestamp": 1720541949000,
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "en",
    "packageName": "com.test",
    "prodDatabaseType": "postgresql",
    "reactive": true,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [],
    "serviceDiscoveryType": false,
    "skipClient": false,
    "skipFakeData": true,
    "testFrameworks": [
      "cypress"
    ],
    "websocket": false,
    "withAdminUi": true
  }
}
Environment and Tools

openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

git version 2.43.0

node: v20.17.0
npm: 10.8.2

Docker version 27.3.1, build ce12230

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
@ChangelogDate("20240617220914")
entity TaxPayer {
  name String required
  rfc String required
  notificationEmail String
  type TaxPayerType
}
@ChangelogDate("20240617220916")
entity Address {
  streetName String required
  neighborhoodSubdivision String required
  municipalityBoxrough String required
  cityLocality String required
  state String required
  postalCode String required
  reference String
}
@ChangelogDate("20240708223004")
@SkipClient
entity SatCAduana (sat_c_aduana) {
  cAduana String required maxlength(5)
  descripcion String required maxlength(255)
  activo Boolean
}
@ChangelogDate("20240709002108")
entity SatCClaveUnidad (sat_c_clave_unidad) {
  cUnidad String required maxlength(5)
  nombre String required maxlength(255)
  simbolo String maxlength(25)
  activo Boolean
}
@ChangelogDate("20240709002109")
@SkipClient
entity SatCMoneda (sat_c_moneda) {
  cMoneda String required maxlength(10)
  descripcion String required maxlength(255)
  decimales Integer
  activo Boolean
}
@ChangelogDate("20240709002110")
entity SatCClaveProdServ (sat_c_clave_prod_serv) {
  cProdServ String required maxlength(8)
  descripcion String required maxlength(255)
  incluirIva String required maxlength(10)
  incluirIeps String required maxlength(10)
  complementoAIncluir String required maxlength(100)
  estimuloFranja BigDecimal required
  activo Boolean required
}
@ChangelogDate("20240709002111")
@SkipClient
entity SatCCodigoPostal (sat_c_codigo_postal) {
  cCp String required maxlength(5)
  cEstado String maxlength(5)
  cMunicipio String maxlength(5)
  cLocalidad String maxlength(5)
  activo Boolean
}
@ChangelogDate("20240709002112")
@SkipClient
entity SatCPais (sat_c_pais) {
  cPais String required maxlength(5)
  descripcion String required maxlength(255)
}
@ChangelogDate("20240709002113")
@SkipClient
entity SatCClaveUnidadPeso (sat_c_clave_unidad_peso) {
  cUnidadPeso String required maxlength(7)
  nombre String required maxlength(255)
  descripcion String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002114")
@SkipClient
entity SatCSubTipoRem (sat_c_sub_tipo_rem) {
  cTipoRemolque String required maxlength(7)
  remolque String required maxlength(80)
  activo Boolean required
}
@ChangelogDate("20240709002115")
@SkipClient
entity SatCLocalidad (sat_c_localidad) {
  cLocalidad String required maxlength(4)
  estado String required maxlength(5)
  descripcion String required maxlength(50)
  activo Boolean required
}
@ChangelogDate("20240709002116")
@SkipClient
entity SatCMaterialPeligroso (sat_c_material_peligroso) {
  cMatPeligroso String required maxlength(6)
  descripcion String required maxlength(255)
  claseODiv String required maxlength(10)
  peligroSecundario String required maxlength(10)
  nombreTecnico String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002117")
@SkipClient
entity SatCMunicipio (sat_c_municipio) {
  cMunicipio String required maxlength(4)
  estado String required maxlength(5)
  descripcion String required maxlength(50)
  activo Boolean required
}
@ChangelogDate("20240709002118")
@SkipClient
entity SatCTipoEmbalaje (sat_c_tipo_embalaje) {
  cEmbalaje String required maxlength(6)
  descripcion String required maxlength(140)
  activo Boolean required
}
@ChangelogDate("20240709002119")
@SkipClient
entity SatCTipoPermisoAtf (sat_c_tipo_permiso_atf) {
  cPermiso String required maxlength(8)
  descripcion String required maxlength(150)
  activo Boolean required
}
@ChangelogDate("20240709002120")
@SkipClient
entity SatCClaveProdServCcp (sat_c_clave_prod_serv_ccp) {
  cProdServ String required maxlength(8)
  descripcion String required maxlength(140)
  palabrasSimilares String required maxlength(255)
  materialPeligroso String required maxlength(4)
  activo Boolean required
}
@ChangelogDate("20240709002121")
@SkipClient
entity SatCClaveColonia (sat_c_clave_colonia) {
  cColonia String required maxlength(6)
  codigoPostal String required maxlength(5)
  colonia String required maxlength(255)
  activo Boolean required
}
@ChangelogDate("20240709002122")
@SkipClient
entity SatCConfigAutotransporte (sat_c_config_autotransporte) {
  cConfAtf String required maxlength(8)
  descripcion String required maxlength(255)
  numEjes Integer required
  numLlantas String required maxlength(10)
  remolque String required maxlength(3)
  activo Boolean
}
@ChangelogDate("20240709161909")
entity ProdServ {
  code String required
  description String required
  um String required
  price BigDecimal required
}

enum TaxPayerType {
  NP,
  LE
}

relationship OneToOne {
  TaxPayer{address required} to Address
}
relationship ManyToOne {
  ProdServ{satCode required} to SatCClaveProdServ
  ProdServ{satUM required} to SatCClaveUnidad
}

service TaxPayer, Address, SatCAduana, SatCClaveUnidad, SatCMoneda, SatCClaveProdServ, SatCCodigoPostal, SatCPais, SatCClaveUnidadPeso, SatCSubTipoRem, SatCLocalidad, SatCMaterialPeligroso, SatCMunicipio, SatCTipoEmbalaje, SatCTipoPermisoAtf, SatCClaveProdServCcp, SatCClaveColonia, SatCConfigAutotransporte, ProdServ with serviceImpl
search TaxPayer, Address, SatCAduana, SatCClaveUnidad, SatCMoneda, SatCClaveProdServ, SatCCodigoPostal, SatCPais, SatCClaveUnidadPeso, SatCSubTipoRem, SatCLocalidad, SatCMaterialPeligroso, SatCMunicipio, SatCTipoEmbalaje, SatCTipoPermisoAtf, SatCClaveProdServCcp, SatCClaveColonia, SatCConfigAutotransporte, ProdServ with no

The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.

Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
@mraible
Copy link
Contributor

mraible commented Dec 7, 2024

Does it work if you try to upgrade to the latest (8.7.3)?

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

2 participants