在jhipster中构建网关的生产版本时出现错误。
用于生产构建的命令是: ./ mvnw -Pprod软件包
我得到
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.