From:  Chris Mills <>
Date:  19 Apr 2017 01:44:16 Hong Kong Time

Re: Express local library tutorial


Hello again Allen,

I’ve just gone through the instructions again, and they work fine for me. I think the script is talking about definitions for the DB objects taken from the model, rather than the routes, so I don’t think that’s an issue.

One thought I had - did you save the script in the right place? The instructions were a bit unclear, so I’ve rewritten them slightly. To be exact, the script should be saved in the same directory as the package.json file.

Other thoughts:

1. Did you create all four models as directed?
2. Did you install async as directed?
3. Check your code against the example repo at

Best regards,

Chris Mills
 Senior tech writer || Mozilla || MDN || @chrisdavidmills

> On 12 Apr 2017, at 16:58, Allen Unrau  wrote:
> Hello 
> I am working through the Express local library tutorial found at I ran into some problems at the end of part 3, where you run the script to populate the database. I downloaded the script, ran it and only got the authors inserted into my database, nothing else. I got these errors on the command line:
> FINAL ERR: ValidationError: Path `genre` is required., Path `book` is required.
> I can't figure out why the authors worked and the rest didn't. At this point in the tutorial we built routes for /, /users, and /users/cool, so according to how I understand things, nothing should have worked. I also didn't get an error for 'bookinstance' but they weren't inserted into the database either. Can anyone shed some light on what is going on?
> I'm going through the 'populatedb.js' code and for each catalog item type (Author, Book, Genre and Bookinstance), I see .save and .push methods being called, presumably to save to the database. Where do these methods come from?
> thx
> _________________________________________________________________________
> Discussing Developer documentation on MDN: dev-mdc mailing list
> List email:
> Manage your membership:
> Unsubscribe:
> MDN contributor guide: