应用程序错误Heroku - 部署问题

时间:2014-12-29 16:35:56

标签: node.js git heroku

试图找出如何将我的应用程序推送到Heroku。我刚刚成功完成了他们的Node.js教程,我能够npm installforeman start在本地运行我的应用程序就好了,但当我尝试推送它并在Heruko网站上打开它时一个错误,我想我需要安装一些东西,但我不能很好地解密日志。

这是我的日志。 (对Git,NodeJS和Heruko FYI来说很新,如果我遗漏了一些明显的东西,那就很抱歉)

$ heroku logs --tail
←[36m2014-12-29T15:38:08.188615+00:00 app[web.1]:←[0m npm ERR! There is likely additional logging output above.
←[36m2014-12-29T15:38:08.188812+00:00 app[web.1]:←[0m npm ERR! System Linux 3.8.11-ec2
←[36m2014-12-29T15:38:08.897061+00:00 heroku[web.1]:←[0m Process exited with status 1
←[36m2014-12-29T15:38:08.916161+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[33m2014-12-29T15:38:29.680490+00:00 heroku[api]:←[0m Scale to web=1 by myEmail.com
←[32m2014-12-29T15:38:36.597146+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=36191235-65e4-441e-9cfa-9498182d1834 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T15:38:36.810592+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=10f03d06-42d1-4119-999a-8337a8651222 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T15:38:40.082568+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=86f49b1b-d70f-444c-9927-4695b6b34e89 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T15:38:40.354619+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=38a9fb83-f441-4752-a1e9-e271db850383 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T15:38:43.300739+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=d579a34f-fb80-4cae-b33e-aa80f3850a69 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T15:38:43.574003+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=91f015a4-ee68-4e2e-b40f-49e47fbf0d99 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[33m2014-12-29T16:03:09.011875+00:00 heroku[api]:←[0m Scale to web=1 by myEmail.com
←[32m2014-12-29T16:03:15.311197+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=c6f7e40a-c7ac-4d68-9aa7-f3341a6cc098 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T16:03:15.594058+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=18a62541-e33a-4781-be06-045abe145879 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[33m2014-12-29T16:09:16.117810+00:00 heroku[api]:←[0m Release v4 created by myEmail.com
←[33m2014-12-29T16:09:16.117779+00:00 heroku[api]:←[0m Deploy c90771b by myEmail.com
←[36m2014-12-29T16:09:16.683226+00:00 heroku[web.1]:←[0m State changed from crashed to starting
←[36m2014-12-29T16:09:18.193386+00:00 heroku[web.1]:←[0m Starting process with command `node server/app.js`
←[36m2014-12-29T16:09:19.314638+00:00 app[web.1]:←[0m module.js:340
←[36m2014-12-29T16:09:19.316610+00:00 app[web.1]:←[0m at Function.Module._load (module.js:280:25)
←[36m2014-12-29T16:09:19.316611+00:00 app[web.1]:←[0m at Module.require (module.js:364:17)
←[36m2014-12-29T16:09:19.316613+00:00 app[web.1]:←[0m at require (module.js:380:17)
←[36m2014-12-29T16:09:19.316615+00:00 app[web.1]:←[0m at module.exports (/app/server/config/express.js:38:13)
←[36m2014-12-29T16:09:19.316617+00:00 app[web.1]:←[0m at Object.<anonymous> (/app/server/app.js:15:28)
←[36m2014-12-29T16:09:19.314316+00:00 app[web.1]:←[0m
←[36m2014-12-29T16:09:19.314898+00:00 app[web.1]:←[0m throw err;
←[36m2014-12-29T16:09:19.314906+00:00 app[web.1]:←[0m           ^
←[36m2014-12-29T16:09:19.316618+00:00 app[web.1]:←[0m at Module._compile (module.js:456:26)
←[36m2014-12-29T16:09:19.316620+00:00 app[web.1]:←[0m at Object.Module._extensions..js (module.js:474:10)
←[36m2014-12-29T16:09:19.316621+00:00 app[web.1]:←[0m at Module.load (module.js:356:32)
←[36m2014-12-29T16:09:19.316608+00:00 app[web.1]:←[0m at Function.Module._resolveFilename (module.js:338:15)
←[36m2014-12-29T16:09:19.316605+00:00 app[web.1]:←[0m Error: Cannot find module 'connect-livereload'
←[36m2014-12-29T16:09:19.316623+00:00 app[web.1]:←[0m at Function.Module._load (module.js:312:12)
←[36m2014-12-29T16:09:20.357443+00:00 heroku[web.1]:←[0m Process exited with status 8
←[36m2014-12-29T16:09:20.375389+00:00 heroku[web.1]:←[0m State changed from crashed to starting
←[36m2014-12-29T16:09:20.374306+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[36m2014-12-29T16:09:22.796156+00:00 heroku[web.1]:←[0m Starting process with command `node server/app.js`
←[36m2014-12-29T16:09:23.802405+00:00 app[web.1]:←[0m
←[36m2014-12-29T16:09:23.803009+00:00 app[web.1]:←[0m throw err;
←[36m2014-12-29T16:09:23.803010+00:00 app[web.1]:←[0m           ^
←[36m2014-12-29T16:09:23.804497+00:00 app[web.1]:←[0m Error: Cannot find module 'connect-livereload'
←[36m2014-12-29T16:09:23.803003+00:00 app[web.1]:←[0m module.js:340
←[36m2014-12-29T16:09:23.804500+00:00 app[web.1]:←[0m at Function.Module._resolveFilename (module.js:338:15)
←[36m2014-12-29T16:09:23.804501+00:00 app[web.1]:←[0m at Function.Module._load (module.js:280:25)
←[36m2014-12-29T16:09:23.804504+00:00 app[web.1]:←[0m at require (module.js:380:17)
←[36m2014-12-29T16:09:23.804503+00:00 app[web.1]:←[0m at Module.require (module.js:364:17)
←[36m2014-12-29T16:09:23.804507+00:00 app[web.1]:←[0m at Object.<anonymous> (/app/server/app.js:15:28)
←[36m2014-12-29T16:09:23.804508+00:00 app[web.1]:←[0m at Module._compile (module.js:456:26)
←[36m2014-12-29T16:09:23.804509+00:00 app[web.1]:←[0m at Object.Module._extensions..js (module.js:474:10)
←[36m2014-12-29T16:09:23.804512+00:00 app[web.1]:←[0m at Function.Module._load (module.js:312:12)
←[36m2014-12-29T16:09:23.804511+00:00 app[web.1]:←[0m at Module.load (module.js:356:32)
←[36m2014-12-29T16:09:23.804506+00:00 app[web.1]:←[0m at module.exports (/app/server/config/express.js:38:13)
←[36m2014-12-29T16:09:24.510417+00:00 heroku[web.1]:←[0m Process exited with status 8
←[36m2014-12-29T16:09:24.535039+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[32m2014-12-29T16:09:25.516484+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=435a24d0-3242-439b-9646-f9a754d0a0f1 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T16:09:25.835724+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=b0ea9325-dbc1-4001-b0d3-fc228043bf55 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[33m2014-12-29T16:11:13.788307+00:00 heroku[api]:←[0m Scale to web=1 by myEmail.com
←[32m2014-12-29T16:23:05.892581+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=3965fe7b-4155-49cf-81c8-56e20fe10ce3 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T16:23:06.183875+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=abdfb4e3-fc6c-4a18-85d0-4fb1653e0040 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[33m2014-12-29T16:24:17.858493+00:00 heroku[api]:←[0m Deploy 461491a by myEmail.com
←[33m2014-12-29T16:24:17.858493+00:00 heroku[api]:←[0m Release v5 created by myEmail.com
←[36m2014-12-29T16:24:17.984165+00:00 heroku[web.1]:←[0m State changed from crashed to starting
←[36m2014-12-29T16:24:20.032515+00:00 heroku[web.1]:←[0m Starting process with command `node server/app.js`
←[36m2014-12-29T16:24:21.011870+00:00 app[web.1]:←[0m module.js:340
←[36m2014-12-29T16:24:21.012416+00:00 app[web.1]:←[0m           ^
←[36m2014-12-29T16:24:21.014369+00:00 app[web.1]:←[0m Error: Cannot find module 'connect-livereload'
←[36m2014-12-29T16:24:21.012169+00:00 app[web.1]:←[0m throw err;
←[36m2014-12-29T16:24:21.014372+00:00 app[web.1]:←[0m at Function.Module._resolveFilename (module.js:338:15)
←[36m2014-12-29T16:24:21.014375+00:00 app[web.1]:←[0m at Module.require (module.js:364:17)
←[36m2014-12-29T16:24:21.011468+00:00 app[web.1]:←[0m
←[36m2014-12-29T16:24:21.014382+00:00 app[web.1]:←[0m at Module._compile (module.js:456:26)
←[36m2014-12-29T16:24:21.014383+00:00 app[web.1]:←[0m at Object.Module._extensions..js (module.js:474:10)
←[36m2014-12-29T16:24:21.014385+00:00 app[web.1]:←[0m at Module.load (module.js:356:32)
←[36m2014-12-29T16:24:21.014386+00:00 app[web.1]:←[0m at Function.Module._load (module.js:312:12)
←[36m2014-12-29T16:24:21.014377+00:00 app[web.1]:←[0m at require (module.js:380:17)
←[36m2014-12-29T16:24:21.014374+00:00 app[web.1]:←[0m at Function.Module._load (module.js:280:25)
←[36m2014-12-29T16:24:21.014379+00:00 app[web.1]:←[0m at module.exports (/app/server/config/express.js:38:13)
←[36m2014-12-29T16:24:21.014380+00:00 app[web.1]:←[0m at Object.<anonymous> (/app/server/app.js:15:28)
←[36m2014-12-29T16:24:21.799791+00:00 heroku[web.1]:←[0m Process exited with status 8
←[36m2014-12-29T16:24:21.808150+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[36m2014-12-29T16:24:21.808844+00:00 heroku[web.1]:←[0m State changed from crashed to starting
←[36m2014-12-29T16:24:23.672321+00:00 heroku[web.1]:←[0m Starting process with command `node server/app.js`
←[36m2014-12-29T16:24:24.673230+00:00 app[web.1]:←[0m
←[36m2014-12-29T16:24:24.675428+00:00 app[web.1]:←[0m at Function.Module._resolveFilename (module.js:338:15)
←[36m2014-12-29T16:24:24.675431+00:00 app[web.1]:←[0m at Module.require (module.js:364:17)
←[36m2014-12-29T16:24:24.675436+00:00 app[web.1]:←[0m at module.exports (/app/server/config/express.js:38:13)
←[36m2014-12-29T16:24:24.673540+00:00 app[web.1]:←[0m module.js:340
←[36m2014-12-29T16:24:24.673797+00:00 app[web.1]:←[0m throw err;
←[36m2014-12-29T16:24:24.673804+00:00 app[web.1]:←[0m           ^
←[36m2014-12-29T16:24:24.675438+00:00 app[web.1]:←[0m at Object.<anonymous> (/app/server/app.js:15:28)
←[36m2014-12-29T16:24:24.675424+00:00 app[web.1]:←[0m Error: Cannot find module 'connect-livereload'
←[36m2014-12-29T16:24:24.675429+00:00 app[web.1]:←[0m at Function.Module._load (module.js:280:25)
←[36m2014-12-29T16:24:24.675443+00:00 app[web.1]:←[0m at Object.Module._extensions..js (module.js:474:10)
←[36m2014-12-29T16:24:24.675445+00:00 app[web.1]:←[0m at Module.load (module.js:356:32)
←[36m2014-12-29T16:24:24.675434+00:00 app[web.1]:←[0m at require (module.js:380:17)
←[36m2014-12-29T16:24:24.675441+00:00 app[web.1]:←[0m at Module._compile (module.js:456:26)
←[36m2014-12-29T16:24:24.675447+00:00 app[web.1]:←[0m at Function.Module._load (module.js:312:12)
←[36m2014-12-29T16:24:25.500954+00:00 heroku[web.1]:←[0m Process exited with status 8
←[36m2014-12-29T16:24:25.515899+00:00 heroku[web.1]:←[0m State changed from starting to crashed
←[32m2014-12-29T16:24:26.941578+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/" host=still-anchorage-3610.herokuapp.com request_id=b2c83aaa-778d-4334-8168-df88891294dd fwd="64.255.74.231" dyno= connect= service= status=503 bytes=
←[32m2014-12-29T16:24:27.226106+00:00 heroku[router]:←[0m at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=still-anchorage-3610.herokuapp.com request_id=4ffb26a0-d806-436b-8bf1-703cc39e17b7 fwd="64.255.74.231" dyno= connect= service= status=503 bytes=

1 个答案:

答案 0 :(得分:0)

您的应用程序似乎无法加载connect-livereload模块。您应该只在本地开发环境中使用它。你可能有这样的代码:

app.use(require('connect-livereload')());
在第15行的app.js

。您需要确保不在生产环境中加载它。您可以将此行包装在if语句中,如:

if (process.env.NODE_ENV === 'development') {
  app.use(require('connect-livereload')());
}

这假设您有一个名为NODE_ENV的环境变量设置为开发,测试或生产,具体取决于您运行应用程序的环境。