0

When i run the command: mvnw -Pprod package -DskipTests i got theses errors:

PROJET_DIRECTORY>npm run webapp:prod

> guineeinfo@0.0.1-SNAPSHOT webapp:prod
> npm run clean-www && npm run webapp:build:prod


> guineeinfo@0.0.1-SNAPSHOT clean-www
> rimraf target/classes/static/app/{src,target/}


> guineeinfo@0.0.1-SNAPSHOT webapp:build:prod
> ng build --configuration production

/ Generating browser application bundles (phase: setup)...DeprecationWarning: 'getMutableClone' has been deprecated since v4.0.0. Use an appropriate `factory.update...` method instead, use `setCommentRange` or `setSourceMapRange`, and avoid setting `parent`.
/ Generating browser application bundles (phase: sealing)...Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\742.e171a2405f5767cf.js": no such file
Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\742.b0a6c4114f06fa22.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\230.a2138959ac8ef9fb.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\170.add042f6ffb59d9a.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\207.1d837adcb0f45770.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\149.540ad7c1f077ddba.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\polyfills.9d0c3413927bcc7e.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\768.7372d2c2b1232b49.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\1.5a9ebd01376c650f.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\603.e7657787a5adfac0.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\157.d3b3bb9926846072.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\25.0a8d2f972e78f3a4.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\309.02d2d31bcdb56c32.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\runtime.0a47f77b2bcae2f3.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\743.0211d9b008f10892.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\982.83219fa0ddff78e6.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\113.2e503c811f66459d.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\696.b9082f0f6ccacf14.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\102.c5a0e5c0b14776bb.js": no such file
[INFO] Error parsing bundle asset "PROJET_DIRECTORY\target\classes\static\main.8a914c32b295c497.js": no such file
[INFO]
[INFO] No bundles were parsed. Analyzer will show only original module sizes from stats file.
[INFO]
[INFO] Webpack Bundle Analyzer saved report to PROJET_DIRECTORY\target\classes\stats.html
[INFO] â?? Browser application bundle generation complete.
[INFO] â?? Browser application bundle generation complete.
[INFO]
[INFO] Error: Optimization error [982.7bfdac8536ec324c.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [696.c62403f835307afb.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [102.0d09ee10c1af6f27.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [743.fdf63b48b024dcee.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [309.779ad7827ed03b25.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [113.6b7640af318460d4.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [157.d2cc755d1a6773e4.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [25.f5cef5ba11c3a06a.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [603.3c2aede976565e96.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [1.7aea729cbcadcc79.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [149.eb981261d6c45b1c.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [768.6109a3d5332b812f.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [207.0ead7a0098a1a450.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [170.b6bd455bd0c46a33.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [230.fcb1741ff04bda7a.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO] Error: Optimization error [742.0dfe242f7784b20e.js]: SyntaxError: Unexpected token: punc ({)
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:04 min
[INFO] Finished at: 2023-01-28T04:58:49-05:00
  1. I use: generator-jhipster: "7.9.3" webpack: "5.74.0" webpack-bundle-analyzer: "4.6.1" OS: windows 10
  2. It's compile successfull on dev, but not on prod.

IT's seem like a webpack problem, i got this trace in the end of the stack trace: (webapp build prod) on project guineeinfo: Failed to run task: 'npm run webapp:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

8
  • Have you tried to run npm run webapp:prod manually not through maven to see if you get more info? Jan 28 at 15:15
  • Yes, i run it and got same errors. Jan 28 at 21:02
  • Don't you get any error before what you pasted here? Please post full log. Jan 28 at 23:18
  • It's a full log, i put the first message i've got before the errors. Jan 29 at 5:40
  • I found another detail, when I use command mvn clean install -Dmaven.test.skip=true , project build and generate jar in dev mode. and when I add the -Pprod option (mvn clean install -Pprod -Dmaven.test.skip=true) the same errors occur. Jan 30 at 4:07

1 Answer 1

1

If you have these errors, verify if in your tsconfig.json you have "target": "es2020", "module": "es2020" if so, change to "target": "es6", "module": "esnext".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.