Jhipster - 404 error on app.js when running in prod profile

爷,独闯天下 提交于 2019-12-11 03:25:03

问题


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:


回答1:


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.



来源:https://stackoverflow.com/questions/40541270/jhipster-404-error-on-app-js-when-running-in-prod-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!