angular - 构建 webpack 时出错 yarn run webpack:prod
问题描述
在 jhipster 中为网关构建生产版本时出现错误。
用于生产构建的命令是:./mvnw -Pprod package
我正进入(状态
Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project wvgateway: Failed to run task: 'yarn run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [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
因此,按照上面的命令,我使用yarn run webpack:prod来构建 webpack 生产版本,但出现错误
ERROR in ./src/main/webapp/app/app.main.ts
Module not found: Error: Can't resolve './app.module.ngfactory' in '/home/kellhydcpu160/Documents/TestDeployment/optima_gateway/src/main/webapp/app'
@ ./src/main/webapp/app/app.main.ts 2:0-62
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决方案
推荐阅读
- regex - VBScript 正则表达式 - 匹配多个
- c# - 将参数从视图发送回控制器以下载文件
- sql - Sql 表被 Readpast 锁定
- powershell - Send-MailMessage:无法将“System.Object[]”转换为参数“Body”所需的类型“System.String”。不支持指定的方法
- pyobjc - 如何使用 PyObjC 从 Python 调用 NSPasteboard withUniqueName
- jenkins - 如何在阶段之前从詹金斯管道中的配置文件中读取
- asp.net - ASP .NET 单页上的多个用户控件 - 回发问题
- html - CSS - 根据 div 宽度设置属性?
- tfs - TFS 构建定义 ASP.Net Web 应用程序错误 CS0246:找不到类型或命名空间名称“WebActivatorEx”
- cpython - Python 3.8.0a3 获取文件系统编码的 Python 编解码器失败