lets-chat
lets-chat copied to clipboard
open() depreciation. How to fix this?
(node:10530) 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
(Use node --trace-deprecation ...
to show where the warning was created)
/Users/carlosdiazplaza/lets-chat/node_modules/mongodb/lib/mongo_client.js:421
throw err
^
Error [MongoError]: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
name: 'MongoError'
}]
at Pool.node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/carlosdiazplaza/.npm/_logs/2021-02-16T21_27_08_134Z-debug.log The terminal process "/bin/zsh '-c', 'npm run start'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
you need to install mongoDB on your machine https://www.mongodb.com/try/download/community?tck=docs_server
you need to install mongoDB on your machine https://www.mongodb.com/try/download/community?tck=docs_server
I installed MongoDB and provide connection but show same error