MongoDB and Mongoose - Create Many Records with model.create()

The Story is:

My main code looks just errorless, so as the other files associated with it. but this issue strangely persists. I have created people with correct modeling, tried different mongoose versions, correct npm initializations & installations, also wiped browser cache, using both local & online IDEs, upgrading/downgrading packages, scraped the entire web for it. and yet the problem is still there. the terminal doesn’t throw any errors; it connects (i guess), but no approval from freecodecamp.

Here is myApp.js :

And the Terminal:

fcc-mongo-mongoose-challenges@0.0.1 start
node server.js

Your app is listening on port 3000

just in case you might know, the options of the mongo connection didn’t make a difference, so I omitted them. also, URI was set right.

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36 Edg/139.0.0.0

Challenge Information:

MongoDB and Mongoose - Create Many Records with model.create()

check in the browser console in the freeCodeCamp page for the more detailed error messages

I appreciate your reply, sir. I got this finally. Well, the issues were tons, chained & sophisticated. However, I would like to share it so that it might help:

The console tab on browser, unfortunately, showed errors as a whole and not in detail. e.g.: Object as eval, internal error, unauthorized admin access, GET error, POST error, etc. So, I did a fresh installation with nothing else, corrected everything for the purpose of FCC parsing; This involved putting arrayOfPeople as an argument of createManyPeople as well. Before hitting this very last point, everything from MongoDB to VsCode terminal was set perfectly, then it was just a matter of time to tell from the browser errors: Object as eval, POST error, to my terminal final error: “TypeError : done is not a function.”. And as mentioned above, solved by correct argument setting. Just want to say:

Do not change or try to fix anything, go along with tutorials atom by atom.

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