我正在尝试生成运行mvnw -DskipTests package -Pprod
的war文件,但我得到了BUILD FAILURE。
当我运行时,我得到以下输出:
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack: `node --max_old_space_size=2048 node_modules/webpack/bin/webpack.js "--config" "webpack/webpack.prod.js" "--profile"`
[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! C:\Users\JJ\AppData\Roaming\npm-cache\_logs\2019-03-31T20_11_44_926Z-debug.log
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack:prod:main: `npm run webpack -- --config webpack/webpack.prod.js --profile`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the [email protected] webpack:prod: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! C:\Users\JJ\AppData\Roaming\npm-cache\_logs\2019-03-31T20_11_45_375Z-debug.log
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! [email protected] webpack:prod: `npm run cleanup && npm run webpack:prod:main && npm run clean-www`
[ERROR] npm ERR! Exit status 2
[ERROR] npm ERR!
[ERROR] npm ERR! Failed at the [email protected] webpack:prod 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! C:\Users\JJ\AppData\Roaming\npm-cache\_logs\2019-03-31T20_11_45_460Z-debug.log
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:56 min
[INFO] Finished at: 2019-03-31T14:11:45-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:npm (webpack build prod) on project indigo: 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]
我甚至创建了全新的Jhipster应用程序并运行命令:mvnw -DskipTests package -Pprod
并得到了同样的错误。
节点版本:v10.15.3
npm版本:6.4.1
Windows 10 x64
我修复它运行npm run webpack:prod
and解决它显示的问题