NodeJS/MongoDB/Mongoose: Unable to pass challenge despite using challenge solution

Tell us what’s happening:

I have tried both my solution and the challenge solution and I just can’t pass it, for some reason. The test fails.

The current link has the challenge solution in it, so it should definitely pass, but it won’t.

Appreciate any help you can provide.

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/93.0.4577.82 Safari/537.36

Challenge: Create Many Records with model.create()

Link to the challenge:

1 Like

What is your code? What is the test that does not pass? What error do you get? The “solution” you link to does not go to code. I’m willing to help but need more info.


Apologies, I thought the link would show the code. This was the error I was seeing:

My code in app.js was as per below:

var arrayOfPeople = [
  {name: "Frankie", age: 74, favoriteFoods: ["Del Taco"]},
  {name: "Sol", age: 76, favoriteFoods: ["roast chicken"]},
  {name: "Robert", age: 78, favoriteFoods: ["wine"]}

var createManyPeople = function(arrayOfPeople, done) {
  Person.create(arrayOfPeople, function (err, people) {
    if (err) return console.log(err);
    done(null, people);

I’ve actually found the issue and it had nothing to do with the above code, I had done something wrong when setting the initial environmental variable.

Thank you for replying!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.