使用Heroku部署的问题

时间:2017-03-21 00:20:01

标签: node.js heroku

当我尝试加载应用时,

表示内部错误。

我不知道如何解决这个问题,好像我修复了一件事,现在其他东西崩溃了。这是我在将端口改为其他人之前在我之前发布的帖子中建议的内容后添加的内容。{{3 }}

const port = Number(process.env.PORT || 3000)

app.listen(端口);

2017-03-20T18:31:08.419571+00:00 heroku[web.1]: State changed from up to starting
    2017-03-20T18:30:58.000000+00:00 app[api]: Build succeeded
    2017-03-20T18:31:09.012177+00:00 heroku[web.1]: Stopping all processes with SIGTERM
    2017-03-20T18:31:09.109050+00:00 heroku[web.1]: Process exited with status 143
    2017-03-20T18:31:10.243346+00:00 heroku[web.1]: Starting process with command `npm start`
    2017-03-20T18:31:13.725851+00:00 app[web.1]:
    2017-03-20T18:31:13.725868+00:00 app[web.1]:
    2017-03-20T18:31:13.725866+00:00 app[web.1]: > heroku@1.0.0 start /app
    2017-03-20T18:31:13.725867+00:00 app[web.1]: > node app.js
    2017-03-20T18:31:14.565182+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
    2017-03-20T18:31:14.565193+00:00 app[web.1]: designed for a production environment, as it will leak
    2017-03-20T18:31:14.565194+00:00 app[web.1]: memory, and will not scale past a single process.
    2017-03-20T18:32:10.777802+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
    2017-03-20T18:32:10.777957+00:00 heroku[web.1]: Stopping process with SIGKILL
    2017-03-20T18:32:10.916517+00:00 heroku[web.1]: Process exited with status 137
    2017-03-20T18:32:10.928136+00:00 heroku[web.1]: State changed from starting to crashed
    2017-03-20T18:32:10.929138+00:00 heroku[web.1]: State changed from crashed to starting
    2017-03-20T18:32:12.404209+00:00 heroku[web.1]: Starting process with command `npm start`
    2017-03-20T18:32:14.547759+00:00 app[web.1]: > heroku@1.0.0 start /app
    2017-03-20T18:32:14.547760+00:00 app[web.1]: > node app.js
    2017-03-20T18:32:14.547740+00:00 app[web.1]:
    2017-03-20T18:32:14.547761+00:00 app[web.1]:
    2017-03-20T18:32:15.032619+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
    2017-03-20T18:32:15.032634+00:00 app[web.1]: designed for a production environment, as it will leak
    2017-03-20T18:32:15.032636+00:00 app[web.1]: memory, and will not scale past a single process.
    2017-03-20T18:32:29.380118+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=murmuring-lake-54140.herokuapp.com request_id=055c1fd8-1947-4747-bbb1-25a5d16c9e08 fwd="184.3.102.130" dyno= connect= service= status=503 bytes= protocol=https
    2017-03-20T18:33:12.681007+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
    2017-03-20T18:33:12.681007+00:00 heroku[web.1]: Stopping process with SIGKILL
    2017-03-20T18:33:12.771627+00:00 heroku[web.1]: Process exited with status 137
    2017-03-20T18:33:12.788087+00:00 heroku[web.1]: State changed from starting to crashed
    2017-03-20T18:33:14.059587+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-lake-54140.herokuapp.com request_id=e496dbe0-e9df-4a6f-882d-db3b3963db96 fwd="184.3.102.130" dyno= connect= service= status=503 bytes= protocol=https
    2017-03-20T18:33:14.423876+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-lake-54140.herokuapp.com request_id=48cb3477-fbb7-4638-9f8e-0fa5835ada8c fwd="184.3.102.130" dyno= connect= service= status=503 bytes= protocol=https
    2017-03-20T18:33:24.000000+00:00 app[api]: Build started by user caseymonaghan94@gmail.com
    2017-03-20T18:33:36.330564+00:00 heroku[web.1]: State changed from crashed to starting
    2017-03-20T18:33:36.136995+00:00 app[api]: Deploy f7864b5 by user caseymonaghan94@gmail.com
    2017-03-20T18:33:36.136995+00:00 app[api]: Release v20 created by user caseymonaghan94@gmail.com
    2017-03-20T18:33:36.289942+00:00 app[api]: Release v20 created by user caseymonaghan94@gmail.com
    2017-03-20T18:33:24.000000+00:00 app[api]: Build succeeded
    2017-03-20T18:33:38.278560+00:00 heroku[web.1]: Starting process with command `npm start`
    2017-03-20T18:33:40.634406+00:00 app[web.1]:
    2017-03-20T18:33:40.634417+00:00 app[web.1]: > node app.js
    2017-03-20T18:33:40.634416+00:00 app[web.1]: > heroku@1.0.0 start /app
    2017-03-20T18:33:40.634417+00:00 app[web.1]:
    2017-03-20T18:33:41.230270+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
    2017-03-20T18:33:41.230279+00:00 app[web.1]: memory, and will not scale past a single process.
    2017-03-20T18:33:41.230278+00:00 app[web.1]: designed for a production environment, as it will leak
    2017-03-20T18:33:41.989081+00:00 heroku[web.1]: State changed from starting to up
    2017-03-20T18:33:47.703444+00:00 app[web.1]: current user: undefined
    2017-03-20T18:33:47.717186+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/views/partials/header.ejs'
    2017-03-20T18:33:47.717188+00:00 app[web.1]:     at Object.fs.openSync (fs.js:583:18)
    2017-03-20T18:33:47.717188+00:00 app[web.1]:     at Object.fs.readFileSync [as fileLoader] (fs.js:490:33)
    2017-03-20T18:33:47.717189+00:00 app[web.1]:     at fileLoader (/app/node_modules/ejs/lib/ejs.js:220:18)
    2017-03-20T18:33:47.717189+00:00 app[web.1]:     at includeSource (/app/node_modules/ejs/lib/ejs.js:257:14)
    2017-03-20T18:33:47.717190+00:00 app[web.1]:     at /app/node_modules/ejs/lib/ejs.js:604:26
    2017-03-20T18:33:47.717190+00:00 app[web.1]:     at Array.forEach (native)
    2017-03-20T18:33:47.717190+00:00 app[web.1]:     at Template.generateSource (/app/node_modules/ejs/lib/ejs.js:580:15)
    2017-03-20T18:33:47.717191+00:00 app[web.1]:     at Template.compile (/app/node_modules/ejs/lib/ejs.js:483:12)
    2017-03-20T18:33:47.717191+00:00 app[web.1]:     at Object.compile (/app/node_modules/ejs/lib/ejs.js:338:16)
    2017-03-20T18:33:47.717192+00:00 app[web.1]:     at handleCache (/app/node_modules/ejs/lib/ejs.js:181:18)
    2017-03-20T18:33:47.717195+00:00 app[web.1]:     at View.exports.renderFile [as engine] (/app/node_modules/ejs/lib/ejs.js:412:10)
    2017-03-20T18:33:47.717192+00:00 app[web.1]:     at tryHandleCache (/app/node_modules/ejs/lib/ejs.js:203:14)
    2017-03-20T18:33:47.717195+00:00 app[web.1]:     at View.render (/app/node_modules/express/lib/view.js:128:8)
    2017-03-20T18:33:47.717196+00:00 app[web.1]:     at tryRender (/app/node_modules/express/lib/application.js:640:10)
    2017-03-20T18:33:47.717196+00:00 app[web.1]:     at Function.render (/app/node_modules/express/lib/application.js:592:3)
    2017-03-20T18:33:47.717197+00:00 app[web.1]:     at ServerResponse.render (/app/node_modules/express/lib/response.js:966:7)
    2017-03-20T18:33:47.721220+00:00 heroku[router]: at=info method=GET path="/" host=murmuring-lake-54140.herokuapp.com request_id=4c89a321-fb86-433d-bd01-75da04c2e73e fwd="184.3.102.130" dyno=web.1 connect=1ms service=45ms status=500 bytes=396 protocol=https
    2017-03-20T19:08:47.779758+00:00 heroku[web.1]: Idling
    2017-03-20T19:08:47.780370+00:00 heroku[web.1]: State changed from up to down
    2017-03-20T19:08:48.629586+00:00 heroku[web.1]: Stopping all processes with SIGTERM
    2017-03-20T19:08:48.862242+00:00 heroku[web.1]: Process exited with status 143
    2017-03-20T23:30:59.498112+00:00 heroku[web.1]: Unidling
    2017-03-20T23:30:59.498427+00:00 heroku[web.1]: State changed from down to starting
    2017-03-20T23:31:00.997030+00:00 heroku[web.1]: Starting process with command `npm start`
    2017-03-20T23:31:03.390317+00:00 app[web.1]:
    2017-03-20T23:31:03.390335+00:00 app[web.1]: > heroku@1.0.0 start /app
    2017-03-20T23:31:03.390336+00:00 app[web.1]: > node app.js
    2017-03-20T23:31:03.390336+00:00 app[web.1]:
    2017-03-20T23:31:03.858803+00:00 app[web.1]: designed for a production environment, as it will leak
    2017-03-20T23:31:03.858783+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
    2017-03-20T23:31:03.858804+00:00 app[web.1]: memory, and will not scale past a single process.
    2017-03-20T23:31:04.675235+00:00 heroku[web.1]: State changed from starting to up
    2017-03-20T23:31:05.586810+00:00 heroku[router]: at=info method=GET path="/" host=murmuring-lake-54140.herokuapp.com request_id=c70b42dc-66dd-4ea1-a0a7-56bf8b190f18 fwd="184.3.102.130" dyno=web.1 connect=1ms service=45ms status=500 bytes=396 protocol=https
    2017-03-20T23:31:05.572979+00:00 app[web.1]: current user: undefined
    2017-03-20T23:31:05.587295+00:00 app[web.1]: Error: ENOENT: no such file or directory, open '/app/views/partials/header.ejs'
    2017-03-20T23:31:05.587297+00:00 app[web.1]:     at Object.fs.openSync (fs.js:583:18)
    2017-03-20T23:31:05.587298+00:00 app[web.1]:     at Object.fs.readFileSync [as fileLoader] (fs.js:490:33)
    2017-03-20T23:31:05.587299+00:00 app[web.1]:     at fileLoader (/app/node_modules/ejs/lib/ejs.js:220:18)
    2017-03-20T23:31:05.587300+00:00 app[web.1]:     at includeSource (/app/node_modules/ejs/lib/ejs.js:257:14)
    2017-03-20T23:31:05.587300+00:00 app[web.1]:     at /app/node_modules/ejs/lib/ejs.js:604:26
    2017-03-20T23:31:05.587301+00:00 app[web.1]:     at Array.forEach (native)
    2017-03-20T23:31:05.587302+00:00 app[web.1]:     at Template.generateSource (/app/node_modules/ejs/lib/ejs.js:580:15)
    2017-03-20T23:31:05.587302+00:00 app[web.1]:     at Template.compile (/app/node_modules/ejs/lib/ejs.js:483:12)
    2017-03-20T23:31:05.587303+00:00 app[web.1]:     at Object.compile (/app/node_modules/ejs/lib/ejs.js:338:16)
    2017-03-20T23:31:05.587304+00:00 app[web.1]:     at handleCache (/app/node_modules/ejs/lib/ejs.js:181:18)
    2017-03-20T23:31:05.587305+00:00 app[web.1]:     at tryHandleCache (/app/node_modules/ejs/lib/ejs.js:203:14)
    2017-03-20T23:31:05.587306+00:00 app[web.1]:     at View.exports.renderFile [as engine] (/app/node_modules/ejs/lib/ejs.js:412:10)
    2017-03-20T23:31:05.587306+00:00 app[web.1]:     at View.render (/app/node_modules/express/lib/view.js:128:8)
    2017-03-20T23:31:05.587308+00:00 app[web.1]:     at Function.render (/app/node_modules/express/lib/application.js:592:3)
    2017-03-20T23:31:05.587307+00:00 app[web.1]:     at tryRender (/app/node_modules/express/lib/application.js:640:10)
    2017-03-20T23:31:05.587308+00:00 app[web.1]:     at ServerResponse.render (/app/node_modules/express/lib/response.js:966:7)
    2017-03-20T23:31:05.766774+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=murmuring-lake-54140.herokuapp.com request_id=23af8613-7990-4132-8caa-6710091c6356 fwd="184.3.102.130" dyno=web.1 connect=1ms service=5ms status=404 bytes=386 protocol=https

0 个答案:

没有答案