简体   繁体   English

JHipster建筑生产概况

[英]JHipster building production profile

Running Windows 10 platform with the following stack: 使用以下堆栈运行Windows 10平台:

  • Java 1.8.0_92 Java 1.8.0_92
  • Maven 3.3.9 Maven的3.3.9
  • JHipster 4.1.0 JHipster 4.1.0
  • Yarn 0.20.3 纱线0.20.3

The application generated is a monolith with AngularJS. 生成的应用程序是AngularJS的整体。 Using HTTP Auth - no social plugins. 使用HTTP身份验证-没有社交插件。

I am current testing deployment to Heroku and ran into a problem where the deployment simply stops. 我目前正在测试对Heroku的部署,但遇到了一个问题,即该部署只是停止了。 I have used the following command before with success to deploy more than one app to Heroku: 在成功将多个应用程序部署到Heroku之前,我已经使用以下命令:

yo jhipster:heroku

This is preferred method to deploy to Heroku according to the documentation. 根据文档,这是部署到Heroku的首选方法。

Since then I have added PostgreSQL and some entities plus a bit of other code. 从那时起,我添加了PostgreSQL和一些实体以及一些其他代码。 Running with SpringBoot and yarn locally works 100%. 使用SpringBoot和yarn在本地运行可以100%运行。 I then tried to deploy to Heroku with the above command, but the process simply hangs. 然后,我尝试使用上述命令将其部署到Heroku,但是该过程只是挂起了。 I have tried different options, event upgaded JHipster from 4.0.8 to 4.1.0, regenerating the application from scratch, leaving out all my custom changes...nothing helps. 我尝试了其他选项,将JHipster从4.0.8升级到4.1.0,从头开始重新生成应用程序,遗漏了所有自定义更改...没有任何帮助。

It seems as if the Maven packaging process is the guilty party here. 看来Maven的包装过程是有罪的。 I then tried to build locally with Maven and the dev profile - success. 然后,我尝试使用Maven和开发人员资料在本地进行构建-成功。 Changing to prod profile experiences the same process where it just hangs with no response. 更改为产品概要文件会经历相同的过程,只是挂起而没有任何响应。 Both processes stop at the same output. 这两个过程在相同的输出处停止。

mvnw package -Pprod -DskipTests

[INFO] --- frontend-maven-plugin:1.3:yarn (webpack build prod) @ test-postgre-sql --- [INFO] --- frontend-maven-plugin:1.3:yarn(webpack build prod)@ test-postgre-sql ---

[INFO] Running 'yarn run webpack:prod' in D:\\DevelopmentProjects\\JHipster\\TestPostgreSQL [INFO]在D:\\ DevelopmentProjects \\ JHipster \\ TestPostgreSQL中运行“ yarn run webpack:prod”

[INFO] yarn run v0.21.3 [INFO]纱线运行v0.21.3

[INFO] $ yarn test && webpack -p --config webpack/webpack.vendor.js && webpack -p --config webpack/webpack.prod.js [INFO] $ yarn test && webpack -p --config webpack / webpack.vendor.js && webpack -p --config webpack / webpack.prod.js

That is the last output and the process simply hangs. 那是最后的输出,该过程只是挂起。 The Windows resource / performance monitor shows no activity in the network, CPU, memory or disk areas that indicates any activity. Windows资源/性能监视器在网络,CPU,内存或磁盘区域中没有显示任何活动的活动。 Leaving it for 8 hours doesn't help either. 放置8小时也无济于事。

This indicates that the problem exists before the Heroku settings are getting involved. 这表明在使用Heroku设置之前存在问题。

Any ideas where to start looking for a solution. 任何从哪里开始寻找解决方案的想法。

Using npm instead of Yarn resolved this problem. 使用npm代替Yarn解决了此问题。 From all the tickets logged and questions posted it seems that Yarn is not stable at the moment on the Windows environment. 从记录的所有票证和发布的问题来看,目前看来,Yarn在Windows环境中不稳定。 Works with npm. 与npm一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM