【问题标题】:Deploying JS app to Heroku - Error H10 503 error, app crashes将 JS 应用程序部署到 Heroku - 错误 H10 503 错误,应用程序崩溃
【发布时间】:2020-08-25 02:59:36
【问题描述】:

我的应用程序 - https://github.com/amyequinn/weatherApp 在终端上完美运行 npm start 但是在将应用程序部署到 Heroku 时它崩溃了,我找不到解决方案。错误是 H10,App Crashed at Get 方法,Status 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.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: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"

有什么想法吗??

非常感谢您的帮助!谢谢你:)

【问题讨论】:

    标签: javascript heroku deploying


    【解决方案1】:

    我按照这个建议让它工作了 - https://codeburst.io/deploy-your-webpack-apps-to-heroku-in-3-simple-steps-4ae072af93a8

    创建 server.js 文件并包含上面链接的内容,确保我的文件路径正确。

    在终端中运行“webpack -p”和“npm run dev”或“node server.js”

    它已在https://weather-app-using-api.herokuapp.com/成功发布到 Heroku

    【讨论】:

      猜你喜欢
      • 2019-12-05
      • 2016-08-20
      • 2012-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      • 1970-01-01
      相关资源
      最近更新 更多