Jhipster - 生产构建失败

时间:2018-06-13 21:32:23

标签: docker npm webpack jhipster yarnpkg

我无法通过运行mvnw -Pprod来生成我的JHipster应用程序之战。这是我在控制台中遇到的错误: https://pastebin.com/3wLwy2x4

我的package.json依赖项:

https://pastebin.com/txnATG6M

解决方案来自: Webpack failure during JHipster Prod Package 对我不起作用,只有错误变为:

[INFO] ERROR in ./src/main/webapp/app/app.main.ts
[INFO] Module not found: Error: Can't resolve './app.module.ngfactory' in 'D:\Programy\Web\softdog2\src\main\webapp\app'
[INFO]  @ ./src/main/webapp/app/app.main.ts 2:0-62
[INFO] MergetJsonsWebpackPlugin emit starts...
[INFO] MergetJsonsWebpackPlugin emit completed...
[ERROR] error Command failed with exit code 2.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:48 min
[INFO] Finished at: 2018-06-13T23:29:58+02:00
[INFO] Final Memory: 50M/532M

另外,我收到了来自纱线的警告:

[ERROR] warning " > angular-particle@1.0.4" has incorrect peer dependency "@angular/core@^4.0.0".
[ERROR] warning " > ng2-page-scroll@4.0.0-beta.12" has incorrect peer dependency "@angular/core@>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll@4.0.0-beta.12" has incorrect peer dependency "@angular/common@>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll@4.0.0-beta.12" has incorrect peer dependency "@angular/platform-browser@>=4.2.6 <5.0.0".
[ERROR] warning " > ng2-page-scroll@4.0.0-beta.12" has incorrect peer dependency "@angular/router@>=4.2.6 <5.0.0".

1 个答案:

答案 0 :(得分:0)

这个问题的答案是更新Angular库版本(在我的例子中是5.1.0到5.1.1)。