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

Could not get unknown property 'NpmTask' for root project '***' of type org.gradle.api.Project. from profile_dev.gradle #27244

Closed LY1806620741 closed 2 months ago

LY1806620741 commented 2 months ago
Overview of the issue

Could not get unknown property 'NpmTask' for root project '***' of type org.gradle.api.Project. from profile_dev.gradle

Motivation for or Use Case

I follows jhipster doc, but it not run normal.

Reproduce the error
  1. use npm install jhipster generator
  2. run jhipster to gen a demo project with microservices gradle react
  3. use idea open the project then gradle load the project, this error occurred.
Related issues

no

Suggest a Fix

maybe miss import plugin id "com.github.node-gradle.node" version "7.0.2"?

JHipster Version(s)

8.7.0

JHipster configuration

To provide all information we need, you should run jhipster info in the project root folder (or workspaces root for microservices), and copy/paste the result here. jhipster info removes sentitive information like rememberKey, jwtSecretKey. Double check if there is any other sensitive info.

As alternative you can add a JDL wrapped in below structure

JDL definitions

```shell
(node:4084) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

        ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
        ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
        ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝
  ██╗   ██║ ██╔═══██║    ██║    ██╔════╝   ╚═══██╗    ██║    ██╔═══╝   ██╔══██║
  ╚██████╔╝ ██║   ██║ ████████╗ ██║       ██████╔╝    ██║    ████████╗ ██║  ╚██╗
   ╚═════╝  ╚═╝   ╚═╝ ╚═══════╝ ╚═╝       ╚═════╝     ╚═╝    ╚═══════╝ ╚═╝   ╚═╝
                            https://www.jhipster.tech
Welcome to JHipster v8.7.0

Welcome to the JHipster Information Sub-Generator

```
demo@0.0.1-SNAPSHOT C:\Users\Administrator\Desktop\demo
`-- (empty)
```

##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**

.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "microservice",
    "authenticationType": "jwt",
    "baseName": "demo",
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "clientFramework": "react",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1726021533797,
    "databaseType": "sql",
    "devDatabaseType": "h2Memory",
    "devServerPort": 9060,
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": true,
    "enableTranslation": true,
    "entities": [],
    "feignClient": null,
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.7.0",
    "languages": [
      "zh-cn",
      "en"
    ],
    "messageBroker": "kafka",
    "microfrontend": null,
    "microfrontends": [],
    "monorepository": true,
    "nativeLanguage": "zh-cn",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "mysql",
    "reactive": true,
    "searchEngine": false,
    "serverPort": 8081,
    "serverSideOptions": [
      "messageBroker:kafka",
      "enableSwaggerCodegen:true"
    ],
    "serviceDiscoveryType": "eureka",
    "skipCommitHook": true,
    "syncUserWithIdp": null,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}
##### **Environment and Tools** openjdk version "22.0.2" 2024-07-16 OpenJDK Runtime Environment (build 22.0.2+9-70) OpenJDK 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing) git version 2.46.0.windows.1 node: v22.7.0 npm: 10.8.2 Docker version 27.1.1, build 6312585 ##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
JDL 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! ```

The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.

Browsers and Operating System

windows 11 professional

qmonmert commented 2 months ago

@DanielFran @mshima I confirm the bug

github-actions[bot] commented 2 months ago

JHipster has completed the sample check .yo-rc.json: blank Entities JDL: blank Application: Frontend check: skipped Backend check: skipped E2E check: skipped

This check uses jhipster info output from the issue description to generate the sample. Bug report that does not contain this information will be marked as invalid.

qmonmert commented 2 months ago

@DanielFran https://opencollective.com/generator-jhipster/expenses/219958 🙂

DanielFran commented 2 months ago

@qmonmert approved

qmonmert commented 2 months ago

thanks