ОШИБКА: с помощью webpack пытается сгенерировать файл войны

#npm #jhipster #war

#npm #jhipster #Война

Вопрос:

Я пытаюсь сгенерировать запущенный файл war mvnw -DskipTests package -Pprod , но я получаю СБОЙ СБОРКИ.

При запуске я получаю следующий вывод:

 [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:UsersJJAppDataRoamingnpm-cache_logs2019-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:UsersJJAppDataRoamingnpm-cache_logs2019-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 amp;amp; npm run webpack:prod:main amp;amp; 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:UsersJJAppDataRoamingnpm-cache_logs2019-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 и запустил command: mvnw -DskipTests package -Pprod и получил ту же ошибку.

Версия узла: v10.15.3

версия npm: 6.4.1

Windows 10 x64

Ответ №1:

Я исправил его запуск npm run webpack:prod и решил проблемы, которые он показывает