I have created a new JHipster 6 project module. While it builds fine locally, it fails on Jenkins.
The Jenkins logs are:
[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! bookstore@0.0.0 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 bookstore@0.0.0 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! bookstore@0.0.0 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 bookstore@0.0.0 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! bookstore@0.0.0 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 bookstore@0.0.0 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
An example of the debug logs (/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 npm@6.4.1
3 info using node@v10.15.0
4 verbose run-script [ 'prewebpack:build:main',
4 verbose run-script 'webpack:build:main',
4 verbose run-script 'postwebpack:build:main' ]
5 info lifecycle bookstore@0.0.0~prewebpack:build:main: bookstore@0.0.0
6 info lifecycle bookstore@0.0.0~webpack:build:main: bookstore@0.0.0
7 verbose lifecycle bookstore@0.0.0~webpack:build:main: unsafe-perm in lifecycle true
8 verbose lifecycle bookstore@0.0.0~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 bookstore@0.0.0~webpack:build:main: CWD: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
10 silly lifecycle bookstore@0.0.0~webpack:build:main: Args: [ '-c',
10 silly lifecycle 'npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal' ]
11 silly lifecycle bookstore@0.0.0~webpack:build:main: Returned: code: 2 signal: null
12 info lifecycle bookstore@0.0.0~webpack:build:main: Failed to exec webpack:build:main script
13 verbose stack Error: bookstore@0.0.0 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 bookstore@0.0.0
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 bookstore@0.0.0 webpack:build:main: `npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal`
22 error Exit status 2
23 error Failed at the bookstore@0.0.0 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 ]
I have another JHipster-5 project that runs/builds fine everywhere. I can't understand something specific from these logs. Is there any configuration I can edit on Jenkins to get clearer logs?
UPDATE - ALL LOGS
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 npm@6.4.1
3 info using node@v10.15.0
4 verbose run-script [ 'prewebpack:build:main',
4 verbose run-script 'webpack:build:main',
4 verbose run-script 'postwebpack:build:main' ]
5 info lifecycle bookstore@0.0.0~prewebpack:build:main: bookstore@0.0.0
6 info lifecycle bookstore@0.0.0~webpack:build:main: bookstore@0.0.0
7 verbose lifecycle bookstore@0.0.0~webpack:build:main: unsafe-perm in lifecycle true
8 verbose lifecycle bookstore@0.0.0~webpack:build:main: PATH: /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/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 bookstore@0.0.0~webpack:build:main: CWD: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
10 silly lifecycle bookstore@0.0.0~webpack:build:main: Args: [ '-c',
10 silly lifecycle 'npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal' ]
11 silly lifecycle bookstore@0.0.0~webpack:build:main: Returned: code: 2 signal: null
12 info lifecycle bookstore@0.0.0~webpack:build:main: Failed to exec webpack:build:main script
13 verbose stack Error: bookstore@0.0.0 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. (/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. (/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 bookstore@0.0.0
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 bookstore@0.0.0 webpack:build:main: npm run webpack -- --config webpack/webpack.dev.js --env.stats=minimal
22 error Exit status 2
23 error Failed at the bookstore@0.0.0 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 ]
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' ]
2 info using npm@6.4.1
3 info using node@v10.15.0
4 verbose run-script [ 'prewebpack:build', 'webpack:build', 'postwebpack:build' ]
5 info lifecycle bookstore@0.0.0~prewebpack:build: bookstore@0.0.0
6 info lifecycle bookstore@0.0.0~webpack:build: bookstore@0.0.0
7 verbose lifecycle bookstore@0.0.0~webpack:build: unsafe-perm in lifecycle true
8 verbose lifecycle bookstore@0.0.0~webpack:build: PATH: /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 bookstore@0.0.0~webpack:build: CWD: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
10 silly lifecycle bookstore@0.0.0~webpack:build: Args: [ '-c', 'npm run cleanup && npm run webpack:build:main' ]
11 silly lifecycle bookstore@0.0.0~webpack:build: Returned: code: 2 signal: null
12 info lifecycle bookstore@0.0.0~webpack:build: Failed to exec webpack:build script
13 verbose stack Error: bookstore@0.0.0 webpack:build: npm run cleanup && npm run webpack:build:main
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/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. (/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 bookstore@0.0.0
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"
18 verbose node v10.15.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error bookstore@0.0.0 webpack:build: npm run cleanup && npm run webpack:build:main
22 error Exit status 2
23 error Failed at the bookstore@0.0.0 webpack:build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
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',
1 verbose cli '--',
1 verbose cli '--config',
1 verbose cli 'webpack/webpack.dev.js',
1 verbose cli '--env.stats=minimal' ]
2 info using npm@6.4.1
3 info using node@v10.15.0
4 verbose run-script [ 'prewebpack', 'webpack', 'postwebpack' ]
5 info lifecycle bookstore@0.0.0~prewebpack: bookstore@0.0.0
6 info lifecycle bookstore@0.0.0~webpack: bookstore@0.0.0
7 verbose lifecycle bookstore@0.0.0~webpack: unsafe-perm in lifecycle true
8 verbose lifecycle bookstore@0.0.0~webpack: PATH: /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/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/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 bookstore@0.0.0~webpack: CWD: /home/jenkins/workspace/jobName/jhipster-6/bookstore-project
10 silly lifecycle bookstore@0.0.0~webpack: Args: [ '-c',
10 silly lifecycle 'node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"' ]
11 silly lifecycle bookstore@0.0.0~webpack: Returned: code: 2 signal: null
12 info lifecycle bookstore@0.0.0~webpack: Failed to exec webpack script
13 verbose stack Error: bookstore@0.0.0 webpack: node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/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. (/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 bookstore@0.0.0
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" "--" "--config" "webpack/webpack.dev.js" "--env.stats=minimal"
18 verbose node v10.15.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error bookstore@0.0.0 webpack: node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.dev.js" "--env.stats=minimal"
22 error Exit status 2
23 error Failed at the bookstore@0.0.0 webpack script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]