简体   繁体   English

将 JS 应用程序部署到 Heroku - 错误 H10 503 错误,应用程序崩溃

[英]Deploying JS app to Heroku - Error H10 503 error, app crashes

My app - https://github.com/amyequinn/weatherApp runs perfectly running npm start on terminal however when deploying the app to Heroku it crashes and I cannot find the solution.我的应用程序 - https://github.com/amyequinn/weatherApp完美运行 npm 在终端上启动,但是当将应用程序部署到 Heroku 时,它会崩溃并且我找不到解决方案。 The error is H10, App Crashed at Get method, Status 503...错误是 H10,App Crashed at Get 方法,状态 503...

"2020-05-08T23:13:34.132652+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=weather-app-using-api.herokuapp.com request_id=edd028a6-ce4c-4b5f-b3c0-229af9eb24fb fwd="80.189.121.112" dyno= connect= service= status=503 bytes= protocol=https "2020-05-08T23:13:34.132652+00:00 heroku[路由器]: at=error code=H10 desc="App crashed" method=GET path="/" host=weather-app-using-api.herokuapp .com request_id=edd028a6-ce4c-4b5f-b3c0-229af9eb24fb fwd="80.189.121.112" dyno= connect= service= status=503 bytes= protocol=https

2020-05-08T23:13:34.964932+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=weather-app-using-api.herokuapp.com request_id=63ded901-6716-4f7a-8f8a-fe0409a9349d fwd="80.189.121.112" dyno= connect= service= status=503 bytes= protocol=https 2020-05-08T23:13:34.964932+00:00 heroku[路由器]: at=error code=H10 desc="App crashed" method=GET path="/" host=weather-app-using-api.herokuapp. com request_id=63ded901-6716-4f7a-8f8a-fe0409a9349d fwd="80.189.121.112" dyno= connect= service= status=503 bytes= protocol=https

2020-05-08T23:13:36.414179+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=weather-app-using-api.herokuapp.com request_id=60c048dd-edbd-405d-aee7-740983dbdedf fwd="80.189.121.112" dyno= connect= service= status=503bytes= protocol=https" 2020-05-08T23:13:36.414179+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=weather-app-using-api .herokuapp.com request_id=60c048dd-edbd-405d-aee7-740983dbddf fwd="80.189.121.112" dyno= connect= service= status=503bytes= protocol=https"

Any ideas??有任何想法吗??

Help is much appreciated:!非常感谢您的帮助:! Thank you :)谢谢 :)

I got it working by following this advice - https://codeburst.io/deploy-your-webpack-apps-to-heroku-in-3-simple-steps-4ae072af93a8我按照这个建议让它工作了 - https://codeburst.io/deploy-your-webpack-apps-to-heroku-in-3-simple-steps-4ae072af93a8

created server.js file and included content linked above, making sure my file paths were correct.创建 server.js 文件并包含上面链接的内容,确保我的文件路径正确。

ran 'webpack -p' and 'npm run dev' or 'node server.js' in terminal在终端中运行“webpack -p”和“npm run dev”或“node server.js”

It was published successfully to Heroku on https://weather-app-using-api.herokuapp.com/它已成功发布到https://weather-app-using-api.herokuapp.com/ 上的 Heroku

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

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