-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
cannot generate entity from v8.7.1 #27353
Comments
Hi, |
I have deleted this bloc in health.json.ejs file and it works fine <%_ if (messageBrokerAny) { %> |
The fix may go to "config.ts" to set messageBroker, messageBrokerAny, messageBrokerKafka & messageBrokerPulsar... No ? |
Workaround, add to project's import { pathToFileURL } from 'node:url';
export async function createGenerator(env) {
const BaseApplicationGenerator = await env.requireGenerator('jhipster:base-application');
return class extends BaseApplicationGenerator {
constructor(args, options, features) {
super(args, options, { ...features, sbsBlueprint: true });
}
get [BaseApplicationGenerator.DEFAULT]() {
return {
async loadApplicationKeys({ application }) {
const jhipsterRoot = env.getPackagePath('jhipster');
const { loadCommandConfigsKeysIntoTemplatesContext } = await import(pathToFileURL(`${jhipsterRoot}/dist/lib/command/load.js`));
const { lookupCommandsConfigs } = await import(pathToFileURL(`${jhipsterRoot}/dist/lib/command/lookup-commands-configs.js`));
loadCommandConfigsKeysIntoTemplatesContext({
templatesContext: application,
commandsConfigs: (await lookupCommandsConfigs()),
});
},
};
}
};
}; |
does not work on Windows:
|
Updated with windows support. |
same result (same stack) |
The stack is not useful to discover the bug location. |
Overview of the issue
cannot generate entity from v8.7.1
ERROR! An error occured while running jhipster:languages#writeClientTranslations
ERROR! ERROR! Error rendering template /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs to /workspaces/tipoca-visualization/src/main/webapp/i18n/ja/health.json: ReferenceError: /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs:32
30| },
31| "indicator": {
messageBrokerAny is not defined
Error: Error rendering template /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs to /workspaces/tipoca-visualization/src/main/webapp/i18n/ja/health.json: ReferenceError: /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs:32
30| },
31| "indicator": {
messageBrokerAny is not defined
at renderTemplate (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/base-core/generator.js:886:23)
at async Promise.all (index 13)
at async LanguagesGenerator.writeFiles (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/base-core/generator.js:1009:23)
at async Promise.all (index 0)
at async LanguagesGenerator.writeClientTranslations (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/generator.js:236:17)
at async LanguagesGenerator.executeTask (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:265:13)
at async runLoop.add.once (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:395:17) {
[cause]: ReferenceError: /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs:32
30| },
31| "indicator": {
messageBrokerAny is not defined
at LanguagesGenerator.eval ("/usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs":13:8)
at health.json (/usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:703:17)
at /usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:260:40
at new Promise ()
at tryHandleCache (/usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:258:14)
at exports.renderFile (/usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/ejs/lib/ejs.js:491:10)
at renderFile (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/mem-fs-editor/dist/util.js:65:16)
at MemFsEditor.processFile (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/mem-fs-editor/dist/actions/copy-tpl-async.js:13:20)
at MemFsEditor.applyProcessingFileFunc (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/mem-fs-editor/dist/actions/copy-async.js:11:54)
at MemFsEditor._copySingleAsync (file:///usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/node_modules/mem-fs-editor/dist/actions/copy-async.js:79:52) {
path: '/usr/local/share/nvm/versions/node/v20.17.0/lib/node_modules/generator-jhipster/dist/generators/languages/templates/src/main/webapp/i18n/ja/health.json.ejs'
}
}
Motivation for or Use Case
cannot generate entity
Reproduce the error
jhipster entity UtageUserData
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.7.1
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
Application files will be generated in folder: /workspaces/tipoca-visualization
INFO!
The entity UtageUserData is being created.
Generating field #1
? Do you want to add a field to your entity? Yes
? What is the name of your field? eventParticipationDate
? What is the type of your field? String
? Do you want to add validation rules to your field? No
================= UtageUserData =================
Fields
eventParticipationDate (String)
Generating field #2
? Do you want to add a field to your entity? No
================= UtageUserData =================
Fields
eventParticipationDate (String)
Generating relationships to other entities
? Do you want to add a relationship to another entity? No
================= UtageUserData =================
Fields
eventParticipationDate (String)
? Do you want to use separate service class for your business logic? Yes, generate a separate service class
? Do you want to use a Data Transfer Object (DTO)? No, use the entity directly
? Do you want to add filtering? Dynamic filtering for the entities with JPA Static metamodel
? Is this entity read-only? Yes
? Do you want pagination and sorting on your entity? Yes, with pagination links and sorting headers
Related issues
Suggest a Fix
JHipster Version(s)
v8.7.1
JHipster configuration
jhipster info
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.7.1
Welcome to the JHipster Information Sub-Generator
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
openjdk version "17.0.7" 2023-04-18 LTS
OpenJDK Runtime Environment Microsoft-7626293 (build 17.0.7+7-LTS)
OpenJDK 64-Bit Server VM Microsoft-7626293 (build 17.0.7+7-LTS, mixed mode)
git version 2.41.0
node: v20.17.0
npm: 10.8.2
Docker version 27.0.3-1, build 7d4bcd863a4c863e650eed02a550dfeb98560b83
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
Browsers and Operating System
MaxOS
The text was updated successfully, but these errors were encountered: