首页 > 数据库 >How to fix MongoDB warnings All In One

How to fix MongoDB warnings All In One

时间:2022-12-08 12:13:10浏览次数:60  
标签:node warnings fix db How https test com

How to fix MongoDB warnings All In One

warnings

$ ➜  api-master git:(api) ✗ yarn final
yarn run v1.22.19
$ nodemon final/index.js
[nodemon] 1.18.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node final/index.js`
(node:46673) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:46673) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:46673) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:46673) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
GraphQL Server running at http://localhost:4000/api


solutions

https://stackoverflow.com/questions/61406974/how-to-clear-warnings-in-node-js-while-using-mongoose

demos

http://localhost:4000/api

image

$ mongo

> show dbs;

> show databases;
> show collections;

> db.test.insert({name: 'webfullstack'});
> db.test.save({name: 'webgeeker'});
> db.test.insert({name: 'xgqfrms'});

> db.test.find({name: 'webfullstack'});
> db.test.find();
> db.test.find().pretty();





https://www.runoob.com/mongodb/mongodb-databases-documents-collections.html

https://www.runoob.com/mongodb/mongodb-query.html

VSCode & MongoDB client

https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-database-client2

https://marketplace.visualstudio.com/items?itemName=cweijan.vscode-mysql-client2

db('notedly').collection('test').find({}).skip(0).limit(1).toArray()

db('notedly').collection('test').find({}).skip(1).limit(10).toArray()

(

标签:node,warnings,fix,db,How,https,test,com
From: https://www.cnblogs.com/xgqfrms/p/16965739.html

相关文章