Hi everyone. I have looked through the posts related to this problem and my app continues to fail after making all the changes.
- I created an env file for my variables.
- I used mongoose and after verifying that it works locally, i moved to mongolabs
- I have deployed to Heroku, and set my config vars as instructed.
I don’t know what to do at this point. Here is my github link
This is the error Heroku logs have recorded:
2019-11-28T15:31:31.302750+00:00 app[web.1]: }]
2019-11-28T15:31:31.302751+00:00 app[web.1]: at Pool.<anonymous> (/app/node_modules/mongodb/lib/core/topologies/server.js:433:11)
2019-11-28T15:31:31.302753+00:00 app[web.1]: at Pool.emit (events.js:210:5)
2019-11-28T15:31:31.302754+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:562:14
2019-11-28T15:31:31.302756+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:985:11
2019-11-28T15:31:31.302757+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/connect.js:40:11
2019-11-28T15:31:31.302759+00:00 app[web.1]: at callback (/app/node_modules/mongodb/lib/core/connection/connect.js:262:5)
2019-11-28T15:31:31.302760+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connect.js:287:7)
2019-11-28T15:31:31.302761+00:00 app[web.1]: at Object.onceWrapper (events.js:300:26)
2019-11-28T15:31:31.302762+00:00 app[web.1]: at Socket.emit (events.js:210:5)
2019-11-28T15:31:31.302764+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:92:8)
2019-11-28T15:31:31.302765+00:00 app[web.1]: at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2019-11-28T15:31:31.302767+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:80:21)
2019-11-28T15:31:31.302768+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
2019-11-28T15:32:28.250908+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-28T15:32:28.329034+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-28T15:32:28.135872+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-11-28T15:32:28.135872+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-11-28T15:32:28.238186+00:00 heroku[web.1]: Process exited with status 22
2019-11-28T15:32:28.173834+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2019-11-28T15:32:33.338226+00:00 heroku[web.1]: Starting process with command `npm start`
2019-11-28T15:32:35.247077+00:00 app[web.1]:
2019-11-28T15:32:35.247105+00:00 app[web.1]: > nouquick@1.0.0 start /app
2019-11-28T15:32:35.247107+00:00 app[web.1]: > set DEBUG=app & nodemon app.js
2019-11-28T15:32:35.247109+00:00 app[web.1]:
2019-11-28T15:32:35.490180+00:00 app[web.1]: [nodemon] 1.19.4
2019-11-28T15:32:35.491048+00:00 app[web.1]: [nodemon] to restart at any time, enter `rs`
2019-11-28T15:32:35.491611+00:00 app[web.1]: [nodemon] watching dir(s): *.*
2019-11-28T15:32:35.491674+00:00 app[web.1]: [nodemon] watching extensions: js,mjs,json
2019-11-28T15:32:35.492095+00:00 app[web.1]: [nodemon] starting `node app.js`
2019-11-28T15:32:36.058628+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2019-11-28T15:32:36.058655+00:00 app[web.1]: designed for a production environment, as it will leak
2019-11-28T15:32:36.058657+00:00 app[web.1]: memory, and will not scale past a single process.
2019-11-28T15:32:36.064702+00:00 app[web.1]: (node:37) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
2019-11-28T15:32:36.064925+00:00 app[web.1]: (node:37) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2019-11-28T15:32:36.084430+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
2019-11-28T15:32:36.084434+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14) {
2019-11-28T15:32:36.084436+00:00 app[web.1]: name: 'MongoNetworkError',
2019-11-28T15:32:36.084438+00:00 app[web.1]: errorLabels: [Array],
2019-11-28T15:32:36.084439+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2019-11-28T15:32:36.084446+00:00 app[web.1]: }]
2019-11-28T15:32:36.084447+00:00 app[web.1]: at Pool.<anonymous> (/app/node_modules/mongodb/lib/core/topologies/server.js:433:11)
2019-11-28T15:32:36.084449+00:00 app[web.1]: at Pool.emit (events.js:210:5)
2019-11-28T15:32:36.084450+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:562:14
2019-11-28T15:32:36.084451+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:985:11
2019-11-28T15:32:36.084453+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/connect.js:40:11
2019-11-28T15:32:36.084454+00:00 app[web.1]: at callback (/app/node_modules/mongodb/lib/core/connection/connect.js:262:5)
2019-11-28T15:32:36.084455+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connect.js:287:7)
2019-11-28T15:32:36.084457+00:00 app[web.1]: at Object.onceWrapper (events.js:300:26)
2019-11-28T15:32:36.084458+00:00 app[web.1]: at Socket.emit (events.js:210:5)
2019-11-28T15:32:36.084459+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:92:8)
2019-11-28T15:32:36.084460+00:00 app[web.1]: at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2019-11-28T15:32:36.084461+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:80:21)
2019-11-28T15:32:36.084511+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2019-11-28T15:32:36.084587+00:00 app[web.1]: (node:37) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2019-11-28T15:32:36.085418+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
2019-11-28T15:32:36.085420+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14) {
2019-11-28T15:32:36.085421+00:00 app[web.1]: name: 'MongoNetworkError',
2019-11-28T15:32:36.085422+00:00 app[web.1]: errorLabels: [Array],
2019-11-28T15:32:36.085423+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2019-11-28T15:32:36.085424+00:00 app[web.1]: }]
2019-11-28T15:32:36.085426+00:00 app[web.1]: at Pool.<anonymous> (/app/node_modules/mongodb/lib/core/topologies/server.js:433:11)
2019-11-28T15:32:36.085427+00:00 app[web.1]: at Pool.emit (events.js:210:5)
2019-11-28T15:32:36.085428+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:562:14
2019-11-28T15:32:36.085429+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:985:11
2019-11-28T15:32:36.085430+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/connect.js:40:11
2019-11-28T15:32:36.085431+00:00 app[web.1]: at callback (/app/node_modules/mongodb/lib/core/connection/connect.js:262:5)
2019-11-28T15:32:36.085433+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connect.js:287:7)
2019-11-28T15:32:36.085434+00:00 app[web.1]: at Object.onceWrapper (events.js:300:26)
2019-11-28T15:32:36.085434+00:00 app[web.1]: at Socket.emit (events.js:210:5)
2019-11-28T15:32:36.085436+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:92:8)
2019-11-28T15:32:36.085437+00:00 app[web.1]: at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2019-11-28T15:32:36.085438+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:80:21)
2019-11-28T15:32:36.085501+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
2019-11-28T15:32:36.086395+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
2019-11-28T15:32:36.086398+00:00 app[web.1]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14) {
2019-11-28T15:32:36.086399+00:00 app[web.1]: name: 'MongoNetworkError',
2019-11-28T15:32:36.086401+00:00 app[web.1]: errorLabels: [Array],
2019-11-28T15:32:36.086402+00:00 app[web.1]: [Symbol(mongoErrorContextSymbol)]: {}
2019-11-28T15:32:36.086403+00:00 app[web.1]: }]
2019-11-28T15:32:36.086405+00:00 app[web.1]: at Pool.<anonymous> (/app/node_modules/mongodb/lib/core/topologies/server.js:433:11)
2019-11-28T15:32:36.086406+00:00 app[web.1]: at Pool.emit (events.js:210:5)
2019-11-28T15:32:36.086408+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:562:14
2019-11-28T15:32:36.086409+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/pool.js:985:11
2019-11-28T15:32:36.086411+00:00 app[web.1]: at /app/node_modules/mongodb/lib/core/connection/connect.js:40:11
2019-11-28T15:32:36.086413+00:00 app[web.1]: at callback (/app/node_modules/mongodb/lib/core/connection/connect.js:262:5)
2019-11-28T15:32:36.086414+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/core/connection/connect.js:287:7)
2019-11-28T15:32:36.086415+00:00 app[web.1]: at Object.onceWrapper (events.js:300:26)
2019-11-28T15:32:36.086417+00:00 app[web.1]: at Socket.emit (events.js:210:5)
2019-11-28T15:32:36.086418+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:92:8)
2019-11-28T15:32:36.086420+00:00 app[web.1]: at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2019-11-28T15:32:36.086421+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:80:21)
2019-11-28T15:32:36.086509+00:00 app[web.1]: (node:37) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
2019-11-28T15:33:26.021849+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=nouquick.herokuapp.com request_id=b965dc59-0d00-446d-b1f4-544ec345caee fwd="197.211.58.9" dyno= connect= service= status=503 bytes= protocol=https
2019-11-28T15:33:33.982179+00:00 heroku[web.1]: State changed from starting to crashed
2019-11-28T15:33:33.880222+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-11-28T15:33:33.880315+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-11-28T15:33:33.956952+00:00 heroku[web.1]: Process exited with status 137
2019-11-28T15:33:57.331172+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=nouquick.herokuapp.com request_id=dcbfd78e-2fdf-4001-b584-88ca796fa5c7 fwd="197.211.58.9" dyno= connect= service= status=503 bytes= protocol=https
2019-11-28T15:33:57.958210+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=nouquick.herokuapp.com request_id=fc7c4503-2a63-4325-af16-38c533ec7f4c fwd="197.211.58.9" dyno= connect= service= status=503 bytes= protocol=https