project_mern_memories icon indicating copy to clipboard operation
project_mern_memories copied to clipboard

error while connecting to db

Open Manimaran41097 opened this issue 4 years ago • 3 comments

[email protected] start C:\Users\Mara\Desktop\MEMORIES_PROJECT\server nodemon index.js

[nodemon] 2.0.7 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json
[nodemon] starting node index.js (node:5772) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) bad auth : Authentication failed.

Manimaran41097 avatar Mar 02 '21 19:03 Manimaran41097

on server side inside root index.js line no. 17 const CONNECTION_URL = 'mongodb+srv://js_mastery:[email protected]/test'; You make sure you're using your own MongoDB Connection URL String or if you don't how to do it, check out this tutorial video of this code Click Here. Specifically, MongoDB Setup Starts at 10:21mint. If you use your own MongoDB Connection URL String perfectly then there will be no Error of bad auth : Authentication failed.

19sajib avatar Mar 16 '21 05:03 19sajib

(node:8820) [MONGODB DRIVER] Warning: the options [useNewUrlParse] is not supported (Use node --trace-warnings ... to show where the warning was created) (node:8820) 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. (node:8820) [MONGODB DRIVER] Warning: Top-level use of w, wtimeout, j, and fsync is deprecated. Use writeConcern instead. error.message what to do?

mesushant13 avatar Jun 11 '21 14:06 mesushant13

@2sajib2 yes, I got the error. bad auth: Authentication failed I used my own MongoDB connection URL. How can I fix this?

blacksaru avatar Sep 02 '21 04:09 blacksaru