mraible / jhipster7-demo

JHipster 7 Demo! 🔥
Apache License 2.0
81 stars 44 forks source link

jhipster7-demo mvnw show error #9

Closed caoshiyu closed 2 years ago

caoshiyu commented 2 years ago

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:npm (webapp build dev) on project blog: Failed to run task: 'npm run webapp:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

mraible commented 2 years ago

Can you please provide some more information so I can try to reproduce the problem?

caoshiyu commented 2 years ago

1、os:Windows 11 家庭版 2、node:v14.16.0 npm:7.8.0 3、java:11.0.13 java version "11.0.13" 2021-10-19 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.13+10-LTS-370) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.13+10-LTS-370, mixed mode)

caoshiyu commented 2 years ago

[INFO] --- frontend-maven-plugin:1.11.3:npm (webapp build dev) @ blog --- [INFO] npm not inheriting proxy config from Maven [INFO] Running 'npm run webapp:build' in D:\minicode\jhipster7-demo-main [INFO] [INFO] > blog@0.0.1-SNAPSHOT webapp:build [INFO] > npm run clean-www && npm run webapp:build:dev [INFO] [INFO] [INFO] > blog@0.0.1-SNAPSHOT clean-www [INFO] > rimraf target/classes/static/app/{src,target/} [INFO] [INFO] internal/modules/cjs/loader.js:883 [INFO] throw err; [INFO] ^ [INFO] [INFO] Error: Cannot find module 'D:\minicode\jhipster7-demo-main\node_modules\rimraf\bin.js' [INFO] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) [INFO] at Function.Module._load (internal/modules/cjs/loader.js:725:27) [INFO] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) [INFO] at internal/main/run_main_module.js:17:47 { [INFO] code: 'MODULE_NOT_FOUND', [INFO] requireStack: [] [INFO] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 49.285 s [INFO] Finished at: 2022-06-06T20:49:51+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:npm (webapp build dev) on project blog: Failed to run task: 'npm run webapp:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

mraible commented 2 years ago

I googled for "rimraf cannot find module windows" and found a couple possible solutions.

From this answer:

npm clean cache --force
npm install --force rimraf

If that doesn't work, try this:

npm install rimraf -g
caoshiyu commented 2 years ago

D:\minicode\jhipster7-demo-main>npm clean cache --force npm WARN using --force Recommended protections disabled. Unknown command: "clean"

To see a list of supported npm commands, run: npm help

D:\minicode\jhipster7-demo-main>npm install --force rimraf npm WARN using --force Recommended protections disabled.

up to date, audited 2593 packages in 14s

69 packages are looking for funding run npm fund for details

13 vulnerabilities (11 high, 2 critical)

To address all issues (including breaking changes), run: npm audit fix --force

Run npm audit for details.

D:\minicode\jhipster7-demo-main>mvnw [INFO] Scanning for projects... [INFO] [INFO] -----------------------< org.jhipster.blog:blog >----------------------- [INFO] Building Blog 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin:2.4.4:run (default-cli) > test-compile @ blog >>> [INFO] [INFO] --- maven-resources-plugin:3.2.0:copy-resources (default-resources) @ blog --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 6 resources [INFO] Copying 26 resources [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ blog --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 6 resources [INFO] Copying 26 resources [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-versions) @ blog --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-dependencyConvergence) @ blog --- [WARNING] Dependency convergence error for net.java.dev.jna:jna:5.2.0 paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.testcontainers:postgresql:1.15.2 +-org.testcontainers:jdbc:1.15.2 +-org.testcontainers:database-commons:1.15.2 +-org.testcontainers:testcontainers:1.15.2 +-org.rnorth.visible-assertions:visible-assertions:2.1.2 +-net.java.dev.jna:jna:5.2.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.testcontainers:postgresql:1.15.2 +-org.testcontainers:jdbc:1.15.2 +-org.testcontainers:database-commons:1.15.2 +-org.testcontainers:testcontainers:1.15.2 +-com.github.docker-java:docker-java-transport-zerodep:3.2.7 +-net.java.dev.jna:jna:5.5.0

[WARNING] Dependency convergence error for org.wildfly.common:wildfly-common:1.5.2.Final paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-undertow:2.4.4 +-io.undertow:undertow-core:2.2.5.Final +-org.jboss.xnio:xnio-api:3.8.0.Final +-org.wildfly.common:wildfly-common:1.5.2.Final and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-undertow:2.4.4 +-io.undertow:undertow-core:2.2.5.Final +-org.jboss.xnio:xnio-api:3.8.0.Final +-org.wildfly.client:wildfly-client-config:1.0.1.Final +-org.wildfly.common:wildfly-common:1.2.0.Final

[WARNING] Dependency convergence error for org.apiguardian:apiguardian-api:1.1.0 paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-api:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-api:5.7.1 +-org.junit.platform:junit-platform-commons:1.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-params:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-engine:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-com.tngtech.archunit:archunit-junit5-engine:0.17.0 +-com.tngtech.archunit:archunit-junit5-engine-api:0.17.0 +-org.junit.platform:junit-platform-engine:1.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:problem-violations:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:problem-spring-common:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:faux-pas:0.8.0 +-org.apiguardian:apiguardian-api:1.0.0

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message: Failed while enforcing releasability. See above detailed error message. [INFO] [INFO] --- jacoco-maven-plugin:0.8.6:prepare-agent (pre-unit-tests) @ blog --- [INFO] argLine set to -javaagent:C:\Users\caogu\.m2\repository\org\jacoco\org.jacoco.agent\0.8.6\org.jacoco.agent-0.8.6-runtime.jar=destfile=D:\minicode\jhipster7-demo-main\target\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m [INFO] [INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) @ blog --- [INFO] [INFO] --- frontend-maven-plugin:1.11.3:install-node-and-npm (install node and npm) @ blog --- [INFO] Node v14.16.0 is already installed. [INFO] NPM 7.8.0 is already installed. [INFO] [INFO] --- frontend-maven-plugin:1.11.3:npm (npm install) @ blog --- [INFO] Running 'npm install' in D:\minicode\jhipster7-demo-main [INFO] [INFO] up to date, audited 2593 packages in 12s [INFO] [INFO] 69 packages are looking for funding [INFO] run npm fund for details [INFO] [INFO] 13 vulnerabilities (11 high, 2 critical) [INFO] [INFO] To address all issues (including breaking changes), run: [INFO] npm audit fix --force [INFO] [INFO] Run npm audit for details. [INFO] [INFO] --- frontend-maven-plugin:1.11.3:npm (webapp build dev) @ blog --- [INFO] npm not inheriting proxy config from Maven [INFO] Running 'npm run webapp:build' in D:\minicode\jhipster7-demo-main [INFO] [INFO] > blog@0.0.1-SNAPSHOT webapp:build [INFO] > npm run clean-www && npm run webapp:build:dev [INFO] [INFO] [INFO] > blog@0.0.1-SNAPSHOT clean-www [INFO] > rimraf target/classes/static/app/{src,target/} [INFO] [INFO] internal/modules/cjs/loader.js:883 [INFO] throw err; [INFO] ^ [INFO] [INFO] Error: Cannot find module 'D:\minicode\jhipster7-demo-main\node_modules\rimraf\bin.js' [INFO] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) [INFO] at Function.Module._load (internal/modules/cjs/loader.js:725:27) [INFO] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) [INFO] at internal/main/run_main_module.js:17:47 { [INFO] code: 'MODULE_NOT_FOUND', [INFO] requireStack: [] [INFO] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 30.545 s [INFO] Finished at: 2022-06-06T21:40:47+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:npm (webapp build dev) on project blog: Failed to run task: 'npm run webapp:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

D:\minicode\jhipster7-demo-main>

caoshiyu commented 2 years ago

D:\minicode\jhipster7-demo-main>npm install rimraf -g

added 12 packages, and audited 13 packages in 10s

2 packages are looking for funding run npm fund for details

found 0 vulnerabilities

D:\minicode\jhipster7-demo-main>mvnw [INFO] Scanning for projects... [INFO] [INFO] -----------------------< org.jhipster.blog:blog >----------------------- [INFO] Building Blog 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin:2.4.4:run (default-cli) > test-compile @ blog >>> [INFO] [INFO] --- maven-resources-plugin:3.2.0:copy-resources (default-resources) @ blog --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 6 resources [INFO] Copying 26 resources [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ blog --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Using 'UTF-8' encoding to copy filtered properties files. [INFO] Copying 6 resources [INFO] Copying 26 resources [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-versions) @ blog --- [INFO] [INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce-dependencyConvergence) @ blog --- [WARNING] Dependency convergence error for net.java.dev.jna:jna:5.2.0 paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.testcontainers:postgresql:1.15.2 +-org.testcontainers:jdbc:1.15.2 +-org.testcontainers:database-commons:1.15.2 +-org.testcontainers:testcontainers:1.15.2 +-org.rnorth.visible-assertions:visible-assertions:2.1.2 +-net.java.dev.jna:jna:5.2.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.testcontainers:postgresql:1.15.2 +-org.testcontainers:jdbc:1.15.2 +-org.testcontainers:database-commons:1.15.2 +-org.testcontainers:testcontainers:1.15.2 +-com.github.docker-java:docker-java-transport-zerodep:3.2.7 +-net.java.dev.jna:jna:5.5.0

[WARNING] Dependency convergence error for org.wildfly.common:wildfly-common:1.5.2.Final paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-undertow:2.4.4 +-io.undertow:undertow-core:2.2.5.Final +-org.jboss.xnio:xnio-api:3.8.0.Final +-org.wildfly.common:wildfly-common:1.5.2.Final and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-undertow:2.4.4 +-io.undertow:undertow-core:2.2.5.Final +-org.jboss.xnio:xnio-api:3.8.0.Final +-org.wildfly.client:wildfly-client-config:1.0.1.Final +-org.wildfly.common:wildfly-common:1.2.0.Final

[WARNING] Dependency convergence error for org.apiguardian:apiguardian-api:1.1.0 paths to dependency are: +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-api:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-api:5.7.1 +-org.junit.platform:junit-platform-commons:1.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-params:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.springframework.boot:spring-boot-starter-test:2.4.4 +-org.junit.jupiter:junit-jupiter:5.7.1 +-org.junit.jupiter:junit-jupiter-engine:5.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-com.tngtech.archunit:archunit-junit5-engine:0.17.0 +-com.tngtech.archunit:archunit-junit5-engine-api:0.17.0 +-org.junit.platform:junit-platform-engine:1.7.1 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:problem-violations:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:problem-spring-common:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.apiguardian:apiguardian-api:1.1.0 and +-org.jhipster.blog:blog:0.0.1-SNAPSHOT +-org.zalando:problem-spring-web:0.26.2 +-org.zalando:faux-pas:0.8.0 +-org.apiguardian:apiguardian-api:1.0.0

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message: Failed while enforcing releasability. See above detailed error message. [INFO] [INFO] --- jacoco-maven-plugin:0.8.6:prepare-agent (pre-unit-tests) @ blog --- [INFO] argLine set to -javaagent:C:\Users\caogu\.m2\repository\org\jacoco\org.jacoco.agent\0.8.6\org.jacoco.agent-0.8.6-runtime.jar=destfile=D:\minicode\jhipster7-demo-main\target\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m [INFO] [INFO] --- properties-maven-plugin:1.0.0:read-project-properties (default) @ blog --- [INFO] [INFO] --- frontend-maven-plugin:1.11.3:install-node-and-npm (install node and npm) @ blog --- [INFO] Node v14.16.0 is already installed. [INFO] NPM 7.8.0 is already installed. [INFO] [INFO] --- frontend-maven-plugin:1.11.3:npm (npm install) @ blog --- [INFO] Running 'npm install' in D:\minicode\jhipster7-demo-main [INFO] [INFO] up to date, audited 2593 packages in 14s [INFO] [INFO] 69 packages are looking for funding [INFO] run npm fund for details [INFO] [INFO] 13 vulnerabilities (11 high, 2 critical) [INFO] [INFO] To address all issues (including breaking changes), run: [INFO] npm audit fix --force [INFO] [INFO] Run npm audit for details. [INFO] [INFO] --- frontend-maven-plugin:1.11.3:npm (webapp build dev) @ blog --- [INFO] npm not inheriting proxy config from Maven [INFO] Running 'npm run webapp:build' in D:\minicode\jhipster7-demo-main [INFO] [INFO] > blog@0.0.1-SNAPSHOT webapp:build [INFO] > npm run clean-www && npm run webapp:build:dev [INFO] [INFO] [INFO] > blog@0.0.1-SNAPSHOT clean-www [INFO] > rimraf target/classes/static/app/{src,target/} [INFO] [INFO] internal/modules/cjs/loader.js:883 [INFO] throw err; [INFO] ^ [INFO] [INFO] Error: Cannot find module 'D:\minicode\jhipster7-demo-main\node_modules\rimraf\bin.js' [INFO] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) [INFO] at Function.Module._load (internal/modules/cjs/loader.js:725:27) [INFO] at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) [INFO] at internal/main/run_main_module.js:17:47 { [INFO] code: 'MODULE_NOT_FOUND', [INFO] requireStack: [] [INFO] } [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 31.027 s [INFO] Finished at: 2022-06-06T21:43:42+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.3:npm (webapp build dev) on project blog: Failed to run task: 'npm run webapp:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

D:\minicode\jhipster7-demo-main>

mraible commented 2 years ago

OK. Can you try re-generating the application with the latest JHipster version and see if that solves the problem?

First, install the latest JHipster:

npm i -g generator-jhipster

Then, delete all the files in the project except for .yo-rc.json and the .jhipster directory. Then, run the following command to re-gen with the latest:

jhipster --with-entities

If this doesn't work, please create a new issue for this in the JHipster project and link to this issue.