Delete Many Documents with model.remove()

May anybody help me with my problem? I cant pass these challenge
https://www.freecodecamp.org/learn/back-end-development-and-apis/mongodb-and-mongoose/delete-many-documents-with-model-remove ’ .
Here is my replit link ’ mongoose mongodb - Replit ’ .Also I have an error that says "TypeError: Cannot read property ‘get’ of undefined
at Object. (/home/runner/mongoose-mongodb/server.js:47:8) " .Tell me please where are my wrongs because i can’t solve it . :pleading_face:

Your package.json file does not contain the version of express shown in the boilerplate and also is missing mongodb. I would start with this package.json file and add mongodb@~3.6.0 and mongoose@~5.4.0 to it as dependencies.

It appears you might have accidentally changed it from ^4.12.4 to ~3.6.0? when you were attempting to add mongodb. Instead of adding mongodb version ~3.6.0, you just added the ~3.6.0 for express.

See if you can make the necessary changes to the file and then click Run again. If it does not work, let us know.

I still have an error.
npm start

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

/home/runner/boilerplate-mm/myApp.js:4
mogoose.connect(‘process.env.MONGO_URI’, { useNewUrlParser: true, useUnifiedTopology: true });
^

ReferenceError: mogoose is not defined
at Object. (/home/runner/boilerplate-mm/myApp.js:4:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object. (/home/runner/boilerplate-mm/server.js:67:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
at node:internal/main/run_main_module:17:47
exit status 1

" boilerplate mm - Replit "

You have a typo:

mogoose.connect(

i guess there’s something wrong on my replit. Still have an error.
(node:522) Warning: Accessing non-existent property ‘count’ of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:522) Warning: Accessing non-existent property ‘findOne’ of module exports inside circular dependency
(node:522) Warning: Accessing non-existent property ‘remove’ of module exports inside circular dependency
(node:522) Warning: Accessing non-existent property ‘updateOne’ of module exports inside circular dependency
Your app is listening on port 3000
/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:474
throw err;
^

MongoError: database name must be a string
at Function.create (/home/runner/boilerplate-mm/node_modules/mongodb-core/lib/error.js:43:12)
at validateDatabaseName (/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/operations/db_ops.js:720:22)
at new Db (/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/db.js:181:3)
at MongoClient.db (/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js:268:14)
at /home/runner/boilerplate-mm/node_modules/mongoose/lib/connection.js:533:62
at /home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/utils.js:414:17
at executeCallback (/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/utils.js:406:9)
at /home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:294:5
at connectCallback (/home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:249:5)
at /home/runner/boilerplate-mm/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:471:7
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
driver: true,
[Symbol(mongoErrorContextSymbol)]: {}
}
exit status 1

Somehow your replit has become corrupt (via something probably beyond your control).

I suggest starting a new project using the repl.it starter link in the first challenge of the setion and make sure you copy over the contents of your current package.json file to the new one. Then in the console, type npm install and wait for it to finish and then try clicking the Run button again and submit the live url shown above the preview.

I was able to start a new project, copy your existing package.json file, npm install in the console, click Run, submit url to end up passing the particular challenge you are working on.

They say " Run npm install -g npm@8.14.0 to update! ". Should I do it?

Did you start a new project or are you still working on the same one shown in one of your replies above?

No. New one and still have error even if I didn’t start coding.

I am thinking of posting a link to a Zoom video conference later tonight where I can do a walk through of how to get the projects started on repl.it. Would that be of any interest to you?

What time? There is any npm code to reset my replit configuration or reset al my npm values put before? Maybe I did something that afects all my website and I do a configuration that will be on all my projects?

Not sure yet.

No

I doubt it. It is probably some little step you are not doing.

Here is 2 AM. There are not any time for like 8pm or something like this?

Or may I take any whatsapp contact with whom I can solve this problem?

Just realized you are 9 time zones ahead of me.

May I get any whatsapp number? Maybe I will finnaly skip this challenge because i spend a week on this challenge and it is so sad.

I do not use whatsapp.

The other option is to work on these challenges locally.

Of course you will have to learn how to use a code editor and a little about Git but as a professional programmer, you will need to learn how to do this at some point.

And this link will resolve my problem?

You will not have to worry about technical issues with repl.it being a problem. You could still run into a problem if you do not follow the steps of the tutorial, but that is a different problem.

Mister I still have problems with my replit. I don’t know what to do. I make it how they tell me on the link above.
npm start

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

the options [useUnifiedTopology] is not supported
{
favoriteFoods: [ ‘pizza’, ‘chips’ ],
_id: 62d061f4850c310f96b543fa,
name: ‘Dave’,
age: 27
}
(node:3990) Warning: Accessing non-existent property ‘count’ of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
(node:3990) Warning: Accessing non-existent property ‘findOne’ of module exports inside circular dependency
(node:3990) Warning: Accessing non-existent property ‘remove’ of module exports inside circular dependency
(node:3990) Warning: Accessing non-existent property ‘updateOne’ of module exports inside circular dependency
Your app is listening on port 3000
/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:466
throw err;
^

MongoError: database name must be a string
at Function.create (/home/runner/boilerplate-mongomongoose-2/node_modules/mongodb-core/lib/error.js:43:12)
at validateDatabaseName (/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/operations/db_ops.js:700:22)
at new Db (/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/db.js:181:3)
at MongoClient.db (/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/mongo_client.js:268:14)
at /home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/lib/connection.js:527:62
at /home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/utils.js:414:17
at executeCallback (/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/utils.js:406:9)
at /home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:286:5
at connectCallback (/home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:241:5)
at /home/runner/boilerplate-mongomongoose-2/node_modules/mongoose/node_modules/mongodb/lib/operations/mongo_client_ops.js:463:7
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
driver: true,
[Symbol(mongoErrorContextSymbol)]: {}
}
exit status 1

they still text this.
I can’t complete my challenges for more than a week