Tell us what’s happening:
I have tried nearly everything and looked at the hints and I can
t get the final test to pass. I’m wondering if it has to do with mongoDB Atlas database. I cloned from Github where my username is joetags but my username is different in MongoDb atlas. I have tried both usernames and neither work. I tried disabling my VPN in case that was the reason.
Your project link(s)
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36.
Challenge: Install and Set Up Mongoose
Link to the challenge:
unhandled promise rejection warning TypeError: cannot read property ‘split’ of null
I am using the secrets tab. I have MONGO_URI as the key and the mongodb path string as the value.
I tried deleting the sample.env, so it would only reference the secrets .env.
Well, if you are still seeing the error in the console, then it is an issue with your URI, and the best thing to do would be to go back to your Atlas dashboard, and copy the connection string again.
Thank you for your help! I have figured it out. The URL string that mongodb gives is incorrect.
This is what I had copied.
The correct URL is: mongodb://:@ds.mlab.com:/
In the help section of this lesson it shows this correct path under problem explanation but then it also shows the path that mongodb has the user copy under Hint #2.
Now for the real question! Why does the one work and not the other? And how would I have figured this out without the correct path being in the hint section? Thank you again.
I cannot say.
My URI looks like this, and works as expected:
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.