JHipster 6 构建在 Jenkins 上失败

问题描述 投票:0回答:0

我创建了一个新的 JHipster 6 项目模块。虽然它在本地构建良好,但在 Jenkins 上却失败了。

Jenkins 日志是:

[INFO] Finished at: 2023-03-08T13:23:16Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.7.6:npm (webpack build dev) on project proj1: Failed to run task: 'npm run webpack:build' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 2 (Exit value: 2) -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :bookstore-monolith
channel stopped
Setting status of bb727ecef9bb7e78234e8a6d66d44b8b27ea4e02 to FAILURE with url https://jenkins.tasosioan.com/job/jobName/4925/ and message: 'The Jenkins CI build failed
 '
-
[INFO] --- frontend-maven-plugin:1.7.6:install-node-and-npm (install node and npm) @ bookstore-monolith ---
[INFO] 
[INFO] --- frontend-maven-plugin:1.7.6:npm (npm install) @ bookstore-monolith ---
[ERROR] npm notice created a lockfile as package-lock.json. You should commit this file.
[ERROR] 
[INFO] 
[INFO] --- frontend-maven-plugin:1.7.6:npm (webpack build dev) @ bookstore-monolith ---
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR! 
[ERROR] npm ERR! Failed at the [email protected] webpack script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR] 
[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     /home/jenkins/.npm/_logs/2023-03-08T13_22_47_383Z-debug.log
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR! 
[ERROR] npm ERR! Failed at the [email protected] webpack:build:main script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR] 
[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     /home/jenkins/.npm/_logs/2023-03-08T13_22_47_406Z-debug.log
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack:build: `npm run cleanup && npm run webpack:build:main`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR! 
[ERROR] npm ERR! Failed at the [email protected] webpack:build script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[ERROR] 
[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     /home/jenkins/.npm/_logs/2023-03-08T13_22_47_427Z-debug.log
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled

调试日志示例(/home/jenkins/.npm/_logs/2023-03-08T13_22_47_383Z-debug.log):

0 info it worked if it ends with ok
1 verbose cli [ '/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node',
1 verbose cli   '/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/bin/npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'webpack:build:main' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prewebpack:build:main',
4 verbose run-script   'webpack:build:main',
4 verbose run-script   'postwebpack:build:main' ]
5 info lifecycle [email protected]~prewebpack:build:main: [email protected]
6 info lifecycle [email protected]~webpack:build:main: [email protected]
7 verbose lifecycle [email protected]~webpack:build:main: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~webpack:build:main: PATH: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jobName/jhipster-6/bookstore-project/node_modules/.bin:/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node_modules/.bin:/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node:/opt/apache-maven-3.6.0/bin:/usr/lib/jvm/jdk-17.0.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
9 verbose lifecycle [email protected]~webpack:build:main: CWD: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
10 silly lifecycle [email protected]~webpack:build:main: Args: [ '-c',
10 silly lifecycle   'npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal' ]
11 silly lifecycle [email protected]~webpack:build:main: Returned: code: 2  signal: null
12 info lifecycle [email protected]~webpack:build:main: Failed to exec webpack:build:main script
13 verbose stack Error: [email protected] webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:962:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
16 verbose Linux 5.15.0-1031-aws
17 verbose argv "/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node" "/home/jenkins/workspace/jobName/jhipster-6/bookstore-project/node/node_modules/npm/bin/npm-cli.js" "run" "webpack:build:main"
18 verbose node v10.15.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error [email protected] webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
22 error Exit status 2
23 error Failed at the [email protected] webpack:build:main script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]

我有另一个 JHipster-5 项目,它在任何地方都运行/构建良好。 我无法从这些日志中了解具体内容。 我可以在 Jenkins 上编辑任何配置以获得更清晰的日志吗?

jhipster
© www.soinside.com 2019 - 2024. All rights reserved.