错误:使用webpack尝试生成war文件

时间:2019-03-31 20:30:09

标签: npm jhipster war

我正在尝试生成运行mvnw -DskipTests package -Pprod的war文件,但出现了构建失败。

运行时,我得到以下输出:

[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 2
[ERROR] npm ERR! indigo@0.0.0 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 indigo@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!     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! indigo@0.0.0 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 indigo@0.0.0 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! indigo@0.0.0 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 indigo@0.0.0 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

1 个答案:

答案 0 :(得分:0)

我修复了它在npm run webpack:prod上的运行并解决了显示的问题