when i type npm test after npm installed gave an error which was related to pass Mongodb URI and user and password i correctly wrote those credentials but still not connecting to the database mongoose.connect(‘mongodb+srv://supercluster.d83jj.mongodb.net/superData’ and username and password but still not connecting, what would be the solution for it? course instructor is Siddharth.
There’s an issue with his solar-system repo you should change, first of all. You’ll see the line
alert("Ooops, We only have 9 planets and a sun. Select a number from 0 - 9")
Change that to
console.error("error on read", err)
This will likely give you more information. Most likely, one of the MONGO_* environment variables are either wrong or not set.
Dear Sir should i use the same URI as our koddekloud teacher used in the wworkflow ? if yes then i am using the same uri ,username,password still it gave an error not connecting to the database if there is alternative way so that i can complete my project i am stuck here from last one day. thanks in advance
Since the match has to be exact, most likely you didn’t but you need to see what the real error was. I gave you the changes you need to make to see that. Go and try that; tell me what error you get.
Also: a link to the lecture or lab would be very useful, since there are probably 4 different courses that use this repo in multiple labs each. Thanks!