node.js - Heroku 上的 Express 应用程序出现应用程序错误

标签 node.js heroku express

我的应用程序已部署到 Heroku,但出现错误。当我运行 heroku log 时,这就是我得到的结果。我的下一步应该是什么?

2014-12-10T00:11:35.262196+00:00 heroku[api]: Release v2 created by jgallardo720@gmail.com
2014-12-10T00:11:35.262157+00:00 heroku[api]: Enable Logplex by jgallardo720@gmail.com
2014-12-10T02:11:58+00:00 heroku[slug-compiler]: Slug compilation started
2014-12-10T02:11:59+00:00 heroku[slug-compiler]: Slug compilation failed: failed to compile Node.js app
2014-12-10T02:34:19+00:00 heroku[slug-compiler]: Slug compilation started
2014-12-10T02:34:24+00:00 heroku[slug-compiler]: Slug compilation finished
2014-12-10T02:34:24.699378+00:00 heroku[api]: Scale to web=1 by jgallardo720@gmail.com
2014-12-10T02:34:24.824438+00:00 heroku[api]: Release v3 created by jgallardo720@gmail.com
2014-12-10T02:34:24.824438+00:00 heroku[api]: Deploy 2e7cde3 by jgallardo720@gmail.com
2014-12-10T02:34:27.064796+00:00 heroku[web.1]: Starting process with command `node app.js`
2014-12-10T02:34:28.830069+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-10T02:34:28.830779+00:00 heroku[web.1]: State changed from crashed to starting
2014-12-10T02:34:28.817610+00:00 heroku[web.1]: Process exited with status 0
2014-12-10T02:34:30.810280+00:00 heroku[web.1]: Starting process with command `node app.js`
2014-12-10T02:34:32.713107+00:00 heroku[web.1]: Process exited with status 0
2014-12-10T02:34:32.728197+00:00 heroku[web.1]: State changed from starting to crashed
2014-12-10T02:34:37.389257+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=emofortunecookie.herokuapp.com request_id=66d97943-635d-41c9-8f16-dd8ce0cc4002 fwd="162.205.69.67" dyno= connect= service= status=503 bytes=
2014-12-10T02:34:38.127871+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=emofortunecookie.herokuapp.com request_id=fb1872cd-f7d5-4883-8e70-fdb3ac86faad fwd="162.205.69.67" dyno= connect= service= status=503 bytes=
2014-12-10T02:35:33.092921+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=emofortunecookie.herokuapp.com request_id=dab56a61-bd92-423a-ae16-3a23c501f9cd fwd="162.205.69.67" dyno= connect= service= status=503 bytes=
2014-12-10T02:35:34.138997+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=emofortunecookie.herokuapp.com request_id=702f3796-e115-488d-b9e6-3431838ccfea fwd="162.205.69.67" dyno= connect= service= status=503 bytes=

Proc文件

web: node app.js

package.json

{
  "name": "emofortunecookie",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "express": "~4.9.0",
    "body-parser": "~1.8.1",
    "cookie-parser": "~1.3.3",
    "morgan": "~1.3.0",
    "serve-favicon": "~2.1.3",
    "debug": "~2.0.0",
    "jade": "~1.6.0",
    "stylus": "0.42.3"
  },
    "engines": {
     "node": "0.10.x",
     "npm": "1.2.x"
  }
}

最佳答案

我最初遵循的教程已经过时了。所以我修改了procfile。

Proc文件

web: node ./bin/www

关于node.js - Heroku 上的 Express 应用程序出现应用程序错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27392504/

相关文章:

Node.js http get 请求错误事件未获取 404 或 403

ajax - Node js - 创建持久的私有(private)聊天室

javascript - 如何使用 horseman 和 nodejs 打开一个 URL 数组?

heroku - Heroku dynos 一天中的什么时间重新启动?

python - 如何升级 Heroku 上的分发包?

python - Heroku Python 远程拒绝错误

javascript - 为什么这个 axios put 请求没有正确设置 header

javascript - Jade使用localStorage获取nodejs View

javascript - Promise 在形成数组时不起作用

node.js - Firebase Auth : Invalid email address crashing node. js (Express) 应用