当我运行命令时:mvnw-Pprod软件包-DskipTests我得到了这些错误:
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.我使用:发电机-jipster:"7.9.3"网络包:"5.74.0"网络包捆绑包分析器:"4.6.1"操作系统: windows 10
1.它在dev上编译成功,但在prodd上没有。
这似乎是一个webpack的问题,我得到了这个跟踪在堆栈跟踪结束:(网络应用程序构建产品)在项目guineeinfo上:无法运行任务:"npm运行Web应用程序:产品"失败。org. apache. commons. exec。执行异常:进程退出,出现错误:1(退出值:1)-〉[帮助1]
1条答案
按热度按时间emeijp431#
如果出现这些错误,请验证在tsconfig.json中是否有“target”:“es2020”,“模块”:“es2020”如果是,则更改为“目标”:“es6”,“模块”:“esnext”。