Tell us what’s happening:
can someone help me, i am having this issue.
when i click on the complete task i am getting these errors
// running tests
Creating and saving a db item should succeed
// tests completed
// console output
[Error]
as i am running it locally, on the terminal it shows this
error on the terminal.
[nodemon] restarting due to changes…
[nodemon] starting node server.js
Your app is listening on port 3000
Database connection successful
OPTIONS
GET
C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomo
###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/127.0.0.0 Safari/537.36
Challenge Information:
MongoDB and Mongoose - Create and Save a Record of a Model
As i run it locally, it shows this error
[nodemon] restarting due to changes…
[nodemon] starting node server.js
Your app is listening on port 3000
Database connection successful
OPTIONS
GET
C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\mongoose\lib\model.js:546
throw new MongooseError(‘Model.prototype.save() no longer accepts a callback’);
^
MongooseError: Model.prototype.save() no longer accepts a callback
at model.save (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\mongoose\lib\model.js:546:11)
at createAndSavePerson (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\myApp.js:26:13)
at C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\server.js:90:3
at Layer.handle [as handle_request] (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\route.js:149:13)
at Route.dispatch (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\route.js:119:3)
at Layer.handle [as handle_request] (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\index.js:284:15
at Function.process_params (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\index.js:346:12)
at next (C:\Users\ABDIRASHID_TAHA\Desktop\GitAndGithub\boilerplate-mongomongoose\node_modules\express\lib\router\index.js:280:10)
Node.js v22.2.0
[nodemon] app crashed - waiting for file changes before starting…