digitalbazaar / bedrock-mongodb

Bedrock mongodb module
Apache License 2.0
2 stars 3 forks source link

Warning: Accessing non-existent property 'MongoError' #69

Closed mattcollier closed 3 years ago

mattcollier commented 3 years ago

I'm seeing this warning on startup when using bedrock-mongodb@8.2 in the bedrock-kms-http test suite.

This may be the new normal. The stack trace would seem to indicate that it has nothing to do with Bedrock code.

(node:233827) Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency
  at emitCircularRequireWarning (internal/modules/cjs/loader.js:650:11)
  at Object.get (internal/modules/cjs/loader.js:664:5)
  at Object.<anonymous> (/home/matt/bedrock-dev/bedrock-kms-http/test/node_modules/mongodb/lib/operations/operation.js:4:38)
  at Module._compile (internal/modules/cjs/loader.js:1063:30)
  at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
  at Module.load (internal/modules/cjs/loader.js:928:32)
  at Function.Module._load (internal/modules/cjs/loader.js:769:14)
  at Module.require (internal/modules/cjs/loader.js:952:19)
  at require (internal/modules/cjs/helpers.js:88:18)
  at Object.<anonymous> (/home/matt/bedrock-dev/bedrock-kms-http/test/node_modules/mongodb/lib/operations/execute_operation.js:4:16)
davidlehn commented 3 years ago

https://developer.mongodb.com/community/forums/t/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency/15411 According to above, safe to ignore, will be fixed in upcoming driver release.

aljones15 commented 3 years ago

@davidlehn @mattcollier looks like this has now been fixed: https://github.com/mongodb/node-mongodb-native/pull/2734

Thumbs up to confirm and I'll close this.

NOTE: test project in master is clean with latest driver.

aljones15 commented 3 years ago

closing as I'm about 6 test projects in and no longer seeing this error.