Heroku上的快递应用程序错误

时间:2014-12-10 02:42:03

标签: node.js heroku express

我的应用已部署到Heroku但我有错误。当我跑heroku logs时,这就是我得到的。我的下一步应该是什么?

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=

Procfile

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"
  }
}

1 个答案:

答案 0 :(得分:6)

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

<强> Procfile

web: node ./bin/www