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

language blueprint fails during unit test #25437

Closed
1 task done
dwarakaprasad opened this issue Mar 7, 2024 · 0 comments · Fixed by #25438
Closed
1 task done

language blueprint fails during unit test #25437

dwarakaprasad opened this issue Mar 7, 2024 · 0 comments · Fixed by #25438

Comments

@dwarakaprasad
Copy link
Contributor

Overview of the issue

A language blueprint fails while running the unit test with the following,

 FAIL  generators/languages/generator.spec.js > SubGenerator languages of lnfix JHipster blueprint > run
TypeError: this.composedBlueprints is not iterable
 ❯ default.validateSupportedLanguages ../../../generator-jhipster/dist/generators/languages/generator.js:94:46
 ❯ default.executeTask ../../../generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:244:26
 ❯ env.queueTask.once ../../../generator-jhipster/node_modules/yeoman-generator/dist/actions/lifecycle.js:218:56
 ❯ runLoop.add.once ../../../generator-jhipster/node_modules/yeoman-environment/dist/environment-base.js:393:23
 ❯ Immediate.<anonymous> ../../../generator-jhipster/node_modules/grouped-queue/lib/subqueue.js:48:34
Motivation for or Use Case

It should be possible to customize language generator through language blueprint.

Reproduce the error

Use the .yo-rc.json file and run the following command in the same folder as the json file.

jhipster generate-blueprint

Related issues

None

Suggest a Fix

Initialize composedBlueprints; with an empty array;
reference

JHipster Version(s)

8.1.0

JHipster configuration
.yo-rc.json file
{
  "generator-jhipster": {
    "additionalSubGenerators": "",
    "baseName": "lnfix",
    "cli": true,
    "entities": [],
    "generators": {
      "languages": {
        "command": true,
        "priorities": [
          "initializing",
          "prompting",
          "configuring",
          "composing",
          "loading",
          "preparing",
          "configuringEachEntity",
          "loadingEntities",
          "preparingEachEntity",
          "preparingEachEntityField",
          "preparingEachEntityRelationship",
          "postPreparingEachEntity",
          "default",
          "writing",
          "writingEntities",
          "postWriting",
          "postWritingEntities",
          "loadingTranslations",
          "install",
          "postInstall",
          "end"
        ],
        "sbs": false,
        "written": true
      }
    },
    "jhipsterVersion": "8.1.0",
    "localBlueprint": false,
    "sampleWritten": true,
    "subGenerators": [
      "languages"
    ]
  }
}
Environment and Tools

Picked up JAVA_TOOL_OPTIONS: -Xmx3489m
openjdk version "19.0.2" 2023-01-17
OpenJDK Runtime Environment (build 19.0.2+7-44)
OpenJDK 64-Bit Server VM (build 19.0.2+7-44, mixed mode, sharing)

git version 2.43.0

node: v20.10.0
npm: 10.2.3

Docker version 24.0.7, build afdd53b

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants