Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open() depreciation. How to fix this? #816

Open
talmax1124 opened this issue Feb 16, 2021 · 2 comments
Open

open() depreciation. How to fix this? #816

talmax1124 opened this issue Feb 16, 2021 · 2 comments

Comments

@talmax1124
Copy link

(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. (/Users/carlosdiazplaza/lets-chat/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at Pool.emit (events.js:315:20)
at Connection. (/Users/carlosdiazplaza/lets-chat/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Object.onceWrapper (events.js:422:26)
at Connection.emit (events.js:315:20)
at Socket. (/Users/carlosdiazplaza/lets-chat/node_modules/mongodb-core/lib/connection/connection.js:189:49)
at Object.onceWrapper (events.js:422:26)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: 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.

@david35008
Copy link

you need to install mongoDB on your machine
https://www.mongodb.com/try/download/community?tck=docs_server

@Dany4s7s85
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants