It shows that after run ‘node --inspect --trace-warnings’ and require(mongodb)
But all the errors are same:
(node:6444) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6444) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
(node:6444) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
(node:6444) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
PS D:\PlayGround\Social.Forum> node --inspect --trace-warnings
Debugger listening on ws://127.0.0.1:9229/7ce5b368-4c76-42ad-9033-a129e99c5072
For help, see: https://nodejs.org/en/docs/inspector
Welcome to Node.js v14.3.0.
Type ".help" for more information.
> require('mongodb')
<ref *1> [Function (anonymous)] {
MongoError: [Function: MongoError],
MongoNetworkError: [Function: MongoNetworkError],
MongoTimeoutError: [Function: MongoTimeoutError],
MongoServerSelectionError: [Function: MongoServerSelectionError],
MongoParseError: [Function: MongoParseError],
MongoWriteConcernError: [Function: MongoWriteConcernError],
MongoBulkWriteError: [Function: BulkWriteError],
BulkWriteError: [Function: BulkWriteError],
Admin: [Function: Admin],
MongoClient: [Function: MongoClient] { connect: [Circular *1] },
Db: [Function: Db] {
SYSTEM_NAMESPACE_COLLECTION: 'system.namespaces',
SYSTEM_INDEX_COLLECTION: 'system.indexes',
SYSTEM_PROFILE_COLLECTION: 'system.profile',
SYSTEM_USER_COLLECTION: 'system.users',
SYSTEM_COMMAND_COLLECTION: '$cmd',
SYSTEM_JS_COLLECTION: 'system.js'
},
Collection: [Function: Collection],
Server: [Function: Server],
ReplSet: [Function: ReplSet],
Mongos: [Function: Mongos],
ReadPreference: [Function: ReadPreference] {
PRIMARY: 'primary',
PRIMARY_PREFERRED: 'primaryPreferred',
SECONDARY: 'secondary',
SECONDARY_PREFERRED: 'secondaryPreferred',
NEAREST: 'nearest',
fromOptions: [Function (anonymous)],
isValid: [Function (anonymous)],
primary: ReadPreference { mode: 'primary', tags: undefined },
primaryPreferred: ReadPreference { mode: 'primaryPreferred', tags: undefined },
secondary: ReadPreference { mode: 'secondary', tags: undefined },
secondaryPreferred: ReadPreference { mode: 'secondaryPreferred', tags: undefined },
nearest: ReadPreference { mode: 'nearest', tags: undefined }
},
GridStore: [Function: GridStore] {
DEFAULT_ROOT_COLLECTION: 'fs',
DEFAULT_CONTENT_TYPE: 'binary/octet-stream',
IO_SEEK_SET: 0,
IO_SEEK_CUR: 1,
IO_SEEK_END: 2,
exist: [Function (anonymous)],
list: [Function (anonymous)],
read: [Function (anonymous)],
readlines: [Function (anonymous)],
unlink: [Function (anonymous)]
},
Chunk: [Function: Chunk] { DEFAULT_CHUNK_SIZE: 261120 },
Logger: [Function: Logger] {
reset: [Function (anonymous)],
currentLogger: [Function (anonymous)],
setCurrentLogger: [Function (anonymous)],
filter: [Function (anonymous)],
setLevel: [Function (anonymous)]
},
AggregationCursor: [Function: AggregationCursor],
CommandCursor: [Function: CommandCursor],
Cursor: [Function: Cursor],
GridFSBucket: [Function: GridFSBucket],
CoreServer: [Function: Server] {
enableServerAccounting: [Function (anonymous)],
disableServerAccounting: [Function (anonymous)],
servers: [Function (anonymous)]
},
CoreConnection: [Function: Connection],
Binary: <ref *2> [Function: Binary] {
BUFFER_SIZE: 256,
SUBTYPE_DEFAULT: 0,
SUBTYPE_FUNCTION: 1,
SUBTYPE_BYTE_ARRAY: 2,
SUBTYPE_UUID_OLD: 3,
SUBTYPE_UUID: 4,
SUBTYPE_MD5: 5,
SUBTYPE_USER_DEFINED: 128,
Binary: [Circular *2]
},
Code: <ref *3> [Function: Code] { Code: [Circular *3] },
Map: <ref *4> [Function: Map] { Map: [Circular *4] },
DBRef: <ref *5> [Function: DBRef] { DBRef: [Circular *5] },
Double: <ref *6> [Function: Double] { Double: [Circular *6] },
Int32: <ref *7> [Function: Int32] { Int32: [Circular *7] },
Long: <ref *8> [Function: Long] {
fromInt: [Function (anonymous)],
fromNumber: [Function (anonymous)],
fromBits: [Function (anonymous)],
fromString: [Function (anonymous)],
INT_CACHE_: { '0': [Long], '1': [Long], '-1': [Long] },
TWO_PWR_16_DBL_: 65536,
TWO_PWR_24_DBL_: 16777216,
TWO_PWR_32_DBL_: 4294967296,
TWO_PWR_31_DBL_: 2147483648,
TWO_PWR_48_DBL_: 281474976710656,
TWO_PWR_64_DBL_: 18446744073709552000,
TWO_PWR_63_DBL_: 9223372036854776000,
ZERO: Long { _bsontype: 'Long', low_: 0, high_: 0 },
ONE: Long { _bsontype: 'Long', low_: 1, high_: 0 },
NEG_ONE: Long { _bsontype: 'Long', low_: -1, high_: -1 },
MAX_VALUE: Long { _bsontype: 'Long', low_: -1, high_: 2147483647 },
MIN_VALUE: Long { _bsontype: 'Long', low_: 0, high_: -2147483648 },
TWO_PWR_24_: Long { _bsontype: 'Long', low_: 16777216, high_: 0 },
Long: [Circular *8]
},
MinKey: <ref *9> [Function: MinKey] { MinKey: [Circular *9] },
MaxKey: <ref *10> [Function: MaxKey] { MaxKey: [Circular *10] },
ObjectID: <ref *11> [Function: ObjectID] {
index: 1063505,
createPk: [Function: createPk],
createFromTime: [Function: createFromTime],
createFromHexString: [Function: createFromHexString],
isValid: [Function: isValid],
ObjectID: [Circular *11],
ObjectId: [Circular *11]
},
ObjectId: <ref *11> [Function: ObjectID] {
index: 1063505,
createPk: [Function: createPk],
createFromTime: [Function: createFromTime],
createFromHexString: [Function: createFromHexString],
isValid: [Function: isValid],
ObjectID: [Circular *11],
ObjectId: [Circular *11]
},
Symbol: <ref *12> [Function: Symbol] { Symbol: [Circular *12] },
Timestamp: <ref *13> [Function: Timestamp] {
fromInt: [Function (anonymous)],
fromNumber: [Function (anonymous)],
fromBits: [Function (anonymous)],
fromString: [Function (anonymous)],
INT_CACHE_: { '0': [Timestamp], '1': [Timestamp], '-1': [Timestamp] },
TWO_PWR_16_DBL_: 65536,
TWO_PWR_24_DBL_: 16777216,
TWO_PWR_32_DBL_: 4294967296,
TWO_PWR_31_DBL_: 2147483648,
TWO_PWR_48_DBL_: 281474976710656,
TWO_PWR_64_DBL_: 18446744073709552000,
TWO_PWR_63_DBL_: 9223372036854776000,
ZERO: Timestamp { _bsontype: 'Timestamp', low_: 0, high_: 0 },
ONE: Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 0 },
NEG_ONE: Timestamp { _bsontype: 'Timestamp', low_: -1, high_: -1 },
MAX_VALUE: Timestamp { _bsontype: 'Timestamp', low_: -1, high_: 2147483647 },
MIN_VALUE: Timestamp { _bsontype: 'Timestamp', low_: 0, high_: -2147483648 },
TWO_PWR_24_: Timestamp { _bsontype: 'Timestamp', low_: 16777216, high_: 0 },
Timestamp: [Circular *13]
},
BSONRegExp: <ref *14> [Function: BSONRegExp] {
BSONRegExp: [Circular *14]
},
Decimal128: <ref *15> [Function: Decimal128] {
fromString: [Function (anonymous)],
Decimal128: [Circular *15]
},
connect: [Circular *1],
instrument: [Function (anonymous)]
}
> (node:1372) Warning: Accessing non-existent property 'count' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
at Object.get (internal/modules/cjs/loader.js:837:5)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\db_ops.js:16:42)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\collection_ops.js:5:23)
(node:1372) Warning: Accessing non-existent property 'findOne' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
at Object.get (internal/modules/cjs/loader.js:837:5)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\db_ops.js:17:44)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\collection_ops.js:5:23)
(node:1372) Warning: Accessing non-existent property 'remove' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
at Object.get (internal/modules/cjs/loader.js:837:5)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\db_ops.js:18:43)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\collection_ops.js:5:23)
(node:1372) Warning: Accessing non-existent property 'updateOne' of module exports inside circular dependency
at emitCircularRequireWarning (internal/modules/cjs/loader.js:823:11)
at Object.get (internal/modules/cjs/loader.js:837:5)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\db_ops.js:19:46)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Module.require (internal/modules/cjs/loader.js:1089:19)
at require (internal/modules/cjs/helpers.js:73:18)
at Object.<anonymous> (D:\PlayGround\Social.Forum\node_modules\mongodb\lib\operations\collection_ops.js:5:23)