Jodster - 在prod配置文件中运行时,app.js上的404错误 [英] Jhipster - 404 error on app.js when running in prod profile

查看:152
本文介绍了Jodster - 在prod配置文件中运行时,app.js上的404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在prod中运行我的jhipster应用程序时遇到问题。在prod war文件的部署之后,由于在/app/app.js
上找不到404,站点无法加载。但是,供应商js和css被正确注入。



错误消息:


加载失败资源:服务器响应状态为404(未找到)

generated.js:19530



未捕获TypeError:无法读取属性'module'未定义(...)

解决方案

div>

你是否也建立了你的应用程序?它看起来像你的应用程序没有建立客户端网站。这实际上是通过gulp build命令完成的。根据您的构建系统maven或gradle,您可以为构建阶段指定prod环境,例如,对于maven mvn -Pprod包


$ b

gulp build 命令将在构建阶段自动执行。在文档中,您可以找到有关如何在生产中使用JHipster的更多信息。


I have a problem running my jhipster application in prod. After the deployment of prod war file the site is unable to load due to a 404 not found on /app/app.js However vendor js and css are correctly injected. Not sure what's causing this issue.

Error message :

Failed to load resource: the server responded with a status of 404 (Not Found)
generated.js:19530

Uncaught TypeError: Cannot read property 'module' of undefined(…)
http://localhost:9080/app/app.js

Failed to load resource: the server responded with a status of 404 (Not Found)

Error as seen in the browser's console:

解决方案

did you also build your app for prod? it looks like your app did not build the client site. This is done actually wiht the gulp build command. Depending on your build system maven or gradle you can specify the prod environment for the build phase, e.g. for maven mvn -Pprod package.

The gulp build command will be automatically executed durring the build phase. In the doc you can find more information about how to use JHipster in production.

这篇关于Jodster - 在prod配置文件中运行时,app.js上的404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆