sdelements / lets-chat

Self-hosted chat app for small teams
http://sdelements.github.io/lets-chat
MIT License
9.76k stars 1.58k forks source link

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

Open talmax1124 opened 3 years ago

talmax1124 commented 3 years ago

(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! lets-chat@0.4.8 start: node app.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lets-chat@0.4.8 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 commented 3 years ago

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

Dany4s7s85 commented 2 years ago

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