-
Notifications
You must be signed in to change notification settings - Fork 22.4k
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
MongoServerError: Invalid namespace specified 'local_library/.genres' #34388
Comments
Did you do the challenge? https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose#genre_model_-_challenge! The error seems to indicate that mongodb doesn't know about genres so it is possibly you didn't do that bit? The populate.db assumes you did (I might need to make that clear - this is something you have to do) If you did, the next step is to check that your models code matches the worked project here: https://github.com/mdn/express-locallibrary-tutorial/tree/main/models |
Yes, challenge was done. I edited populatedb.js to skip genres and it has the same error with authors. Maybe this is a networking issue with mongodb? I am doing this on my work computer. I also know next to nothing about networking. |
I finally found the problem. My mongodb url looked like: |
Now that I notice it, the error message |
Glad you worked it out. Something for me to remember if I see the URL again. |
MDN URL
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Express_Nodejs/mongoose
What specific section or headline is this issue about?
Testing - Create Some Items
What information was incorrect, unhelpful, or incomplete?
Followed the tutorial exactly. When trying to run
node populatedb <mongodb url>
, I get the error "MongoServerError: Invalid namespace specified 'local_library/.genres" (code: 73). I'm very new to this and don't know what the problem is. I copy-pasted all of the code to ensure that I didn't mistype anything. And yes, I followed the steps to set up mongodb cloud.What did you expect to see?
The script should complete without error.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/learn/server-side/express_nodejs/mongoose
The text was updated successfully, but these errors were encountered: