Hi all,
I’m a little confused by the exercise tracker template that I’m working with off of glitch. Right off the bat, it throws an error about the mongodb method used to open the connection being deprecated, and then says there’s an unhandled error.
It says nothing in the instructions about fixing this, nor can I really figure out how to. I tried adding a mongodb connection string in my process.env file, but that didn’t resolve it.
Any help here? Am i missing part of the assignment or is the template broken?
link to my glitch: https://glitch.com/edit/#!/complex-fixed-column
Error output:
(node:2783) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See http://mongoosejs.com/docs/4.x/docs/connections.html#use-mongo-client
🐇🚨 Your app is listening on port 3000
events.js:160
throw er; // Unhandled 'error' event
^
MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (/rbd/pnpm-volume/e82dc444-c10c-4122-9de2-86f8337a8e49/node_modules/.registry.npmjs.org/mongodb-core/2.1.18/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection.<anonymous> (/rbd/pnpm-volume/e82dc444-c10c-4122-9de2-86f8337a8e49/node_modules/.registry.npmjs.org/mongodb-core/2.1.18/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Connection.g (events.js:292:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket.<anonymous> (/rbd/pnpm-volume/e82dc444-c10c-4122-9de2-86f8337a8e49/node_modules/.registry.npmjs.org/mongodb-core/2.1.18/node_modules/mongodb-core/lib/connection/connection.js:189:49)
at Socket.g (events.js:292:16)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at emitErrorNT (net.js:1290:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)