我在将应用程序部署到heroku时遇到问题。错误代码h10

时间:2020-05-01 20:42:08

标签: node.js heroku

先谢谢了。我是一个初学者,如果这个问题很荒谬,我深表歉意。

我有一个Procfile,看来应该可以使用。

我尝试添加

"scripts": {
   "start": "node index.js"
}

到我的package.json。

我的heroku日志如下:

2020-05-01T20:22:43.838621+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=rocky-anchorage-20795.herokuapp.com request_id=b5aebc83-44db-482e-9f57-543a84aadb90 fwd="162.84.137.120" dyno= connect= service= status=503 bytes= protocol=https
2020-05-01T20:22:45.166890+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=rocky-anchorage-20795.herokuapp.com request_id=7d65b439-4dd1-4c5f-ac2e-89ee3bae74f5 fwd="162.84.137.120" dyno= connect= service= status=503 bytes= protocol=https

代码托管在这里:

https://github.com/DaleLuce/newsletter-signup

1 个答案:

答案 0 :(得分:0)

问题出在我的procfile中,而不是

web:node app.js

我添加了一个空格...

web: node app.js

Aaaa奏效了。