You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a fresh newly project, follows the answers I did for the project:
C:>cd C:\var\asd
C:\var\asd>jhipster
Welcome to JHipster v8.0.0-beta.2
? What is the base name of your application? asd
? Which type of application would you like to create? Monolithic application (recommended for simple projects)
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application Portuguese
? Please choose additional languages to install English
? Do you want to make it reactive with Spring WebFlux? Yes
? What is your default Java package name? com.test
? Which type of authentication would you like to use? JWT authentication (stateless, with a token)
? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, MSSQL)
? Which production database would you like to use? PostgreSQL
? Which development database would you like to use? H2 with disk-based persistence
? Would you like to use Maven or Gradle for building the backend? Maven
? Which other technologies would you like to use?
? Which Framework would you like to use for the client? Angular
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Besides JUnit and Jest, which testing frameworks would you like to use?
info Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days
info for: CN=Java Hipster, OU=Development, O=com.test, L=, ST=, C=
info KeyStore 'C:\var\asd\src\main\resources\config\tls\keystore.p12' generated successfully.
...
Right after the project is created, without any changes, I've just run the following, and follows the error I'm getting:
C:\var\asd>jhipster export-jdl test.jh
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
Welcome to JHipster v8.0.0-beta.2
ERROR! An error occured while running jhipster:export-jdl#convertToJDL
ERROR! ERROR! An error occurred while exporting to JDL: Unknown value 'null' for option 'cacheProvider'.
Error: Unknown value 'null' for option 'cacheProvider'.
Error: An error occurred while exporting to JDL: Unknown value 'null' for option 'cacheProvider'.
Error: Unknown value 'null' for option 'cacheProvider'.
at default.convertToJDL (file:///C:/Users/canixe/AppData/Roaming/npm/node_modules/generator-jhipster/dist/generators/export-jdl/generator.mjs:54:27)
at default.executeTask (file:///C:/Users/canixe/AppData/Roaming/npm/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:240:26)
at env.queueTask.once (file:///C:/Users/canixe/AppData/Roaming/npm/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:214:56)
at runLoop.add.once (file:///C:/Users/canixe/AppData/Roaming/npm/node_modules/generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:383:23)
at Immediate. (C:\Users\canixe\AppData\Roaming\npm\node_modules\generator-jhipster\node_modules\grouped-queue\lib\subqueue.js:48:34)
at process.processImmediate (node:internal/timers:471:21)
I've checked the file .yo-rc.json, and seems like the cacheProvider is set to null, and there were no questions on project creation regarding the cache I want, as you can see above on the first set, not sure if the bug would be having no question, since it is mentioned here: https://www.jhipster.tech/creating-an-app/
I believe for a newly created project, the export-jdl shouldn't crash.
Follows the Info:
C:\var\asd>jhipster info
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
java version "17.0.1" 2021-10-19 LTS
Java(TM) SE Runtime Environment (build 17.0.1+12-LTS-39)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
git version 2.35.0.windows.1
node: v18.13.0
npm: 9.8.1
Docker version 24.0.2, build cb74dfc
JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
√ applying multi-step templates
info Multiple customCommitTask tasks found (C:\var\asd#jhipster:info, jhipster:bootstrap). Using the first.
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Sponsored with ❤️ by @oktadev.C:\var\asd>jhipster info
WARNING! Since JHipster v8, the jhipster command will not use the locally installed generator-jhipster.
If you want to execute the locally installed generator-jhipster, run: npx jhipster
And if I manually ammend the file .yo-rc.json, a similar issue happens with other fields, it seems the default values were not set correctly on the project creation maybe?
cacheProvider defaults to null instead of "no"
messageBroker defaults to false instead of "no"
searchEngine defaults to false instead of "no"
serviceDiscoveryType defaults to false instead of "no"
websocket defaults to false instead of "no"
gradleEnterpriseHost defaults to null instead of "" (this one causes a different error message: "Cannot read properties of null (reading 'includes')", this happens because string properties come here: https://github.com/jhipster/generator-jhipster/blob/v8.0.0-beta.2/jdl/models/jdl-application-definition.ts -> shouldTheValueBeQuoted)
The text was updated successfully, but these errors were encountered:
joaocarloscg
changed the title
jhipster export-jdl broken on newly created project
jhipster project creation sets wrong default values on .yo-rc.json
Jul 26, 2023
When creating a fresh newly project, follows the answers I did for the project:
Right after the project is created, without any changes, I've just run the following, and follows the error I'm getting:
I've checked the file .yo-rc.json, and seems like the cacheProvider is set to null, and there were no questions on project creation regarding the cache I want, as you can see above on the first set, not sure if the bug would be having no question, since it is mentioned here: https://www.jhipster.tech/creating-an-app/
I believe for a newly created project, the export-jdl shouldn't crash.
Follows the Info:
From what I see here: https://github.com/jhipster/generator-jhipster/blob/main/jdl/jhipster/application-options.ts
And here: https://github.com/jhipster/generator-jhipster/blob/main/jdl/jhipster/cache-types.ts
The default value should be "no"
And if I manually ammend the file .yo-rc.json, a similar issue happens with other fields, it seems the default values were not set correctly on the project creation maybe?
cacheProvider defaults to null instead of "no"
messageBroker defaults to false instead of "no"
searchEngine defaults to false instead of "no"
serviceDiscoveryType defaults to false instead of "no"
websocket defaults to false instead of "no"
gradleEnterpriseHost defaults to null instead of "" (this one causes a different error message: "Cannot read properties of null (reading 'includes')", this happens because string properties come here: https://github.com/jhipster/generator-jhipster/blob/v8.0.0-beta.2/jdl/models/jdl-application-definition.ts -> shouldTheValueBeQuoted)
The text was updated successfully, but these errors were encountered: