I'm doing API with the node and using Mongoose. When I give a yarn dev
to start my Nodemon, there is an error in Mongo, I have no idea how to solve this. Would anyone have any ideas? (I'm using the MongoDB Atlas database)
Right after the following error.
yarn run v1.22.5
$ nodemon src/server.js
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node src/server.js`
(node:752) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:752) DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.
I'm using the
My package.json
{
"name": "backend",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"dev": "nodemon src/server.js"
},
"dependencies": {
"express": "^4.17.1",
"md5": "^2.3.0",
"mongoose": "^5.11.16",
"multer": "^1.4.2",
"yarn": "^1.22.10"
},
"devDependencies": {
"nodemon": "^2.0.7"
}
}
Just found this, warning can be ignored it will be fixed in the coming updates
Hi All,
Thanks for reporting! I hit the issue myself today while I was working. I checked in with the Node driver team. The warning is safe to ignore and will hopefully be gone in an upcoming release.