嗨,我遇到了一些问题:我尝试在heroku上部署一个nodejs应用程序,但是当我尝试打开它时,出现此错误:
2017-06-08T16:08:43.221350+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=xmpp-discord.herokuapp.com request_id=6692a6c4-2563-474d-90e2-1657d83c7393 fwd="92.157.13.75" dyno= connect= service= status=503 bytes= protocol=https
2017-06-08T16:08:43.433802+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=xmpp-discord.herokuapp.com request_id=ab1f0f7d-4eed-4948-94e2-bb80fcd9887b fwd="92.157.13.75" dyno= connect= service= status=503 bytes= protocol=https
我的应用程序是 Discord 和 XMPP 之间的桥梁:这里是 github 库:Github但我运行并设置了它,它确实可以在本地运行,但我想整天运行该程序,即使我的电脑没有打开。
我应该或可以做什么?
如果您需要更多信息,请告诉我!
谢谢
最佳答案
它就在日志中“缺少脚本'开始'”。在您的 procfile 中或由于 Heroku 默认设置,您的应用程序尝试使用“npm start”启动,但您的 package.json 未定义启动脚本。
将您的 procfile 更新为正确的启动命令,或者添加到 package.json 中的“scripts”对象中,例如:“start”:“node server.js”或您通常用来启动应用程序的任何命令。
关于node.js - Heroku部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44441174/