jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.58k stars 4.02k forks source link

Microsservices project and Openapi-client #20191

Closed lucaprieto closed 4 months ago

lucaprieto commented 2 years ago
Overview of the issue

I created a project with jhipster and chose microservices, then I ran "jhipster openapi-client" and the error always appeared:

/bin/sh: 1: undefined: not found
Something went wrong while running npm install: /bin/sh: 1: undefined: not found

After looking at the code I saw that the .yo-rc.json file did not have the "clientPackageManager" variable

Reproduce the error

Create a project for Microsservices and than execute: jhipster openapi-client

Suggest a Fix

In file .yo-rx.json insert the line:

"clientPackageManager": "npm"

JHipster Version(s)
microsservices@0.0.0 /media/haiu/f3e4efef-49ce-4134-809a-2842f38e60471/p/sde/yuer/backend/microsservices
└── generator-jhipster@7.9.3 
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "microservice",
    "authenticationType": "jwt",
    "baseName": "microsservices",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "hazelcast",
    "clientFramework": "no",
    "creationTimestamp": 1664457594380,
    "clientPackageManager": "npm",
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "jwtSecretKey": "XXXXXXX",
    "languages": ["pt-br", "en", "es"],
    "messageBroker": "kafka",
    "microfrontend": false,
    "microfrontends": [],
    "monorepository": true,
    "nativeLanguage": "pt-br",
    "otherModules": [],
    "packageName": "YYYYYYYYYYYYY",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": "elasticsearch",
    "serverPort": "8061",
    "serverSideOptions": ["searchEngine:elasticsearch", "messageBroker:kafka"],
    "serviceDiscoveryType": "eureka",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": true,
    "skipCommitHook": true,
    "skipFakeData": false,
    "skipUserManagement": true,
    "testFrameworks": ["cypress"],
    "websocket": false,
    "withAdminUi": false
  }
}

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

Environment and Tools

openjdk version "18" 2022-03-22 OpenJDK Runtime Environment (build 18+36-2087) OpenJDK 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)

git version 2.20.1

node: v14.19.3

npm: 6.14.17

Docker version 20.10.18, build b40c2f6

Docker Compose version v2.11.1

Browsers and Operating System

Chrome Linux - Debian

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days