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

FATAL! <my-subgenerator> is not a known command #28247

Closed
3 tasks
fabianorodrigo opened this issue Dec 19, 2024 · 2 comments
Closed
3 tasks

FATAL! <my-subgenerator> is not a known command #28247

fabianorodrigo opened this issue Dec 19, 2024 · 2 comments

Comments

@fabianorodrigo
Copy link

FATAL! is not a known command

I've created a JHipster blueprint based on JHipster 7.9.3 and now I'm trying to convert it to JHipster 8. I used to run my subgenerators via command line like "jhipster-my-blueprint my-subgenerator" but now I face a fatal error "my-subgenerator is not a known command".

JHipster info

Welcome to JHipster v8.7.3

Welcome to the JHipster Information Sub-Generator

/home/fabianorodrigo/Downloads/arqv3jhip3
└── (empty)
JHipster configuration not found
.yo-rc.json file for testeBlueprintObras
{
  "generator-jhipster": {
    "applicationIndex": 0,
    "applicationType": "microservice",
    "authenticationProtocol": "cas",
    "authenticationType": "jwt",
    "baseName": "testeBlueprintObras",
    "blueprints": [
      {
        "name": "generator-jhipster-ancine-arqv3",
        "version": "0.0.0"
      }
    ],
    "cacheProvider": "no",
    "entities": [
      "Obra",
      "Segmento"
    ],
    "jhipsterVersion": "8.7.3",
    "languages": [
      "pt-br",
      "en"
    ],
    "lastLiquibaseTimestamp": 1734608536000,
    "microserviceStackType": "Istio",
    "nativeLanguage": "pt-br",
    "packageName": "br.gov.ancine.arq",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "serverPort": "8082",
    "siglaAplicacao": "ARQV3JHIP3",
    "skipClient": true,
    "skipUserManagement": true
  },
  "generator-jhipster-ancine-arqv3": {
    "authenticationProtocol": "cas",
    "baseName": "testeBlueprintObras",
    "extraOptions": [],
    "microserviceStackType": "Istio",
    "nomeAplicacao": "Teste de upgrade do blueprint para JHipster 8",
    "siglaAplicacao": "ARQV3JHIP3",
    "sistema": "SAD"
  }
}
.yo-rc.json file for testeBlueprintPessoas
{
  "generator-jhipster": {
    "applicationIndex": 1,
    "applicationType": "microservice",
    "authenticationProtocol": "cas",
    "authenticationType": "jwt",
    "baseName": "testeBlueprintPessoas",
    "blueprints": [
      {
        "name": "generator-jhipster-ancine-arqv3",
        "version": "0.0.0"
      }
    ],
    "cacheProvider": "no",
    "entities": [
      "Pessoa",
      "Endereco",
      "DocumentoPessoa"
    ],
    "jhipsterVersion": "8.7.3",
    "languages": [
      "pt-br",
      "en"
    ],
    "lastLiquibaseTimestamp": 1734608596000,
    "microserviceStackType": "Istio",
    "nativeLanguage": "pt-br",
    "packageName": "br.gov.ancine.arq",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "serverPort": "8081",
    "siglaAplicacao": "ARQV3JHIP3",
    "skipClient": true,
    "skipUserManagement": true
  },
  "generator-jhipster-ancine-arqv3": {
    "authenticationProtocol": "cas",
    "baseName": "testeBlueprintPessoas",
    "extraOptions": [],
    "microserviceStackType": "Istio",
    "nomeAplicacao": "Teste de upgrade do blueprint para JHipster 8",
    "siglaAplicacao": "ARQV3JHIP3",
    "sistema": "SAD"
  }
}
.yo-rc.json file for testeBlueprintSomenteteste
{
  "generator-jhipster": {
    "applicationIndex": 2,
    "applicationType": "microservice",
    "authenticationProtocol": "cas",
    "authenticationType": "jwt",
    "baseName": "testeBlueprintSomenteteste",
    "blueprints": [
      {
        "name": "generator-jhipster-ancine-arqv3",
        "version": "0.0.0"
      }
    ],
    "cacheProvider": "no",
    "entities": [
      "TesteBigDecimal",
      "TesteFloat",
      "TesteDouble",
      "TesteEnum",
      "TesteBoolean",
      "TesteLocalDate",
      "TesteZonedDateTime",
      "TesteInstant",
      "TesteUUID",
      "TesteBlob",
      "TesteAnyBlob",
      "TesteTextBlob"
    ],
    "jhipsterVersion": "8.7.3",
    "languages": [
      "pt-br",
      "en"
    ],
    "lastLiquibaseTimestamp": 1734609136000,
    "microserviceStackType": "Istio",
    "nativeLanguage": "pt-br",
    "packageName": "br.gov.ancine.arq",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "serverPort": "8083",
    "siglaAplicacao": "ARQV3JHIP3",
    "skipClient": true,
    "skipUserManagement": true
  },
  "generator-jhipster-ancine-arqv3": {
    "authenticationProtocol": "cas",
    "baseName": "testeBlueprintSomenteteste",
    "extraOptions": [],
    "microserviceStackType": "Istio",
    "nomeAplicacao": "Teste de upgrade do blueprint para JHipster 8",
    "siglaAplicacao": "ARQV3JHIP3",
    "sistema": "SAD"
  }
}
Environment and Tools

openjdk version "21.0.5" 2024-10-15 LTS
OpenJDK Runtime Environment Temurin-21.0.5+11 (build 21.0.5+11-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.5+11 (build 21.0.5+11-LTS, mixed mode, sharing)

git version 2.43.0

node: v20.18.0
npm: 10.9.0

Docker version 27.3.1, build ce12230
WARNING! Current location doesn't contain a valid JHipster application

Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/

Thanks for using JHipster!

  • jhipster info output is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.
Motivation for or Use Case

I've created this subgenerator in order to build some artifacts related to microservices created by JHipster in the sudirectories. It used to work when I call this way with JHIpster 7.9.3. After upgrading to v8.7, the command "my-subgenerator" is no more recognized. It seems to be a bug for me.

Reproduce the error
Related issues
Suggest a Fix
JHipster Version(s)
Browsers and Operating System
  • Tickets opened without reproduction steps or that doesn't follows the template recommendation will be closed.
  • Checking this box is mandatory (this is just to show you read everything)
@mshima
Copy link
Member

mshima commented Dec 20, 2024

You should provide a reproducible sample.
Custom command is used by official ionic and react-native blueprints.

generate-blueprint prompts supports adding custom command.

@fabianorodrigo
Copy link
Author

@mshima , thank you very much for your tips. I found out that was a mistake of mine. I've named the file inside directory cli as command.cjs instead of commands.cjs in plural.
Sorry for wasting your time!

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

3 participants