node.js - Jhipster Prod 构建失败
问题描述
我尝试使用“mvnw package -Pprod -DskipTests”命令运行 prod 构建以生成 WAR 文件
这是我面临的错误:
npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! DocScore@0.0.0 webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.prod.js" "--profile"`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the DocScore@0.0.0 webpack script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\LenovoWin\AppData\Roaming\npm-cache\_logs\2020-04-25T07_40_41_872Z-debug.log
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! DocScore@0.0.0 webpack:prod:main: `npm run webpack -- --config webpack/webpack.prod.js --profile`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the DocScore@0.0.0 webpack:prod:main script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\LenovoWin\AppData\Roaming\npm-cache\_logs\2020-04-25T07_40_42_317Z-debug.log
[INFO] npm ERR! code ELIFECYCLE
[INFO] npm ERR! errno 2
[INFO] npm ERR! DocScore@0.0.0 webpack:prod: `npm run cleanup && npm run webpack:prod:main && npm run clean-www`
[INFO] npm ERR! Exit status 2
[INFO] npm ERR!
[INFO] npm ERR! Failed at the DocScore@0.0.0 webpack:prod script.
[INFO] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO]
[INFO] npm ERR! A complete log of this run can be found in:
[INFO] npm ERR! C:\Users\LenovoWin\AppData\Roaming\npm-cache\_logs\2020-04-25T07_40_42_438Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12:48 min
[INFO] Finished at: 2020-04-25T13:10:42+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.8.0:npm (webpack build prod) on project docscore: Failed to run task: 'npm run webpack:prod' 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
这些是我正在使用的版本:
- 节点 v12.13.0
- NPM 6.13.0
- jhipster 6.5.1
解决方案
推荐阅读
- ansible - 在ansible中如何显示除-C之外的主机组或主机?
- python - 用其他因变量求解未知变量
- ms-access - 在数据表或连续表单视图中的表单上,我们如何将第二个组合框中的可能值基于在第一个组合框中选择的值?
- postgresql - 在使用非 Equi 连接条件时避免使用嵌套循环连接
- airflow - 气流月度延迟是一天还是一个月?
- amazon-dynamodb - dynamodb 在 np dynamodb 或 np vogels 的帮助下,抛出 Invalid schema content 错误
- django - geography=True 的 Django PointField 无法保存数据:SQL 函数错误
- git - 如何在 VisualStudio 2019 中同步多个 repo?
- python - 如何使用python将json字符串作为命令行参数传递
- sql - Oracle - 通过简单查询显示增量 ID