Comments (5)
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
from content.
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.
from content.
I finally found the problem. My mongodb url looked like:
...mongodb.net/local_library/?retryWrites=true...
When I removed the "/" just before the "?"
...mongodb.net/local_library?retryWrites=true...
It worked. I guess it was just my mistyping.
from content.
Now that I notice it, the error message
Invalid namespace specified 'local_library/.genres'
actually shows the problem. I expect that the "/" after local_library wouldn't be there if genres truly didn't exist and I had typed the correct url.
from content.
Glad you worked it out. Something for me to remember if I see the URL again.
from content.
Related Issues (20)
- Please avoid BC/AD in favor of BCE/CE HOT 1
- closing popover with timer is not in conformance with WCAG recommendation
- Invalid Uint8Array constructor used in HKDF SubtleCrypto.deriveKey example
- document.write example doesn't work HOT 1
- shorthand property list: missing properties HOT 3
- font-palette demo may have rapid flashing HOT 2
- availability is incorrect for `@property` HOT 1
- String.prototype.slice() endIndex conversion behavior is incorrect HOT 2
- Jasvascript Math.round
- keep 11 year old link? HOT 1
- Clarification needed: Absolute positioning behavior without specified offsets HOT 1
- No information about the triggering reflow in the `innerText` property page. HOT 1
- [WebAPI] GeolocationCoordinates & GeolocationPosition should expose to.JSON()
- [WebAPI] Additions to Resource Timing API
- Remove CanvasRenderingContext2d scrollPathIntoView
- Standalone pages for Sec-WebSocket-* headers
- New pages for two new(ish) UA CH headers
- New page for Service-Worker-Allowed
- Animation playback events have not been covered
- Font color is to white
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from content.