Skip to content

Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency #9900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
OliverwengFiltered opened this issue Feb 5, 2021 · 13 comments
Assignees
Labels
underlying library issue This issue is a bug with an underlying library, like the MongoDB driver or mongodb-core
Milestone

Comments

@OliverwengFiltered
Copy link

OliverwengFiltered commented Feb 5, 2021

Upgraded to mongoose 5.11.15, and getting this warnning.
Warning: Accessing non-existent property 'MongoError' of module exports inside circular dependency.

Anyone has insights about this one ?

@Megapixel99
Copy link

Megapixel99 commented Feb 6, 2021

I am running into this error/warnning too.

@ztomm
Copy link

ztomm commented Feb 8, 2021

A temporarily fix for this is https://stackoverflow.com/a/66102270/10944219

@IslandRhythms IslandRhythms added interop issue issue with interop between Mongoose and another npm module that is not a Mongoose prod dependency underlying library issue This issue is a bug with an underlying library, like the MongoDB driver or mongodb-core and removed interop issue issue with interop between Mongoose and another npm module that is not a Mongoose prod dependency labels Feb 8, 2021
@vkarpov15
Copy link
Collaborator

This is an issue with the MongoDB driver: mongodb/node-mongodb-native#2734 . We'll upgrade to MongoDB 3.6.5 when it is released 👍

@Akshit-WTF
Copy link

Upgrading to version [email protected] has brought this issue to my workspace. However, downgrading back to 5.11.15 fixes it. Also, 5.11.16 brings along a new depreciation warning:
DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version.

@ddialar
Copy link

ddialar commented Feb 13, 2021

I can confirm the situation exposed by @Akshit-WTF. Same update and same warning message.

I followed the downgrading process proposed in the previous message and the warning disappeared.

ddialar added a commit to ddialar/typescript.workshop.backend that referenced this issue Feb 13, 2021
This change has been done due to the last version introduces a warning message that is not documented in the oficial source.

This subject is been covered in the next issue Automattic/mongoose#9900
@vkarpov15 vkarpov15 modified the milestones: 5.11.17, 5.11.18 Feb 15, 2021
@mikayelgr
Copy link

I was getting the same error but after downgrading to v5.11.13 it started working

@EmanSza
Copy link

EmanSza commented Feb 22, 2021

Warning Still Exists on 5.11.16. Downgrading to 5.11.15 Fixed Warning.
image

@mikayelgr
Copy link

Yeah I still get the warning and after tracing the issue here's the result

node --trace-warnings src/index
(node:14900) 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> (C:\Users\micha\Desktop\????\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> (C:\Users\micha\Desktop\????\node_modules\mongodb\lib\operations\execute_operation.js:4:16)

@EmanSza
Copy link

EmanSza commented Feb 23, 2021

Yeah I still get the warning and after tracing the issue here's the result

node --trace-warnings src/index
(node:14900) 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> (C:\Users\micha\Desktop\????\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> (C:\Users\micha\Desktop\????\node_modules\mongodb\lib\operations\execute_operation.js:4:16)

Is the warning on .15 or .16?

@mikayelgr
Copy link

Yeah I still get the warning and after tracing the issue here's the result

node --trace-warnings src/index
(node:14900) 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> (C:\Users\micha\Desktop\????\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> (C:\Users\micha\Desktop\????\node_modules\mongodb\lib\operations\execute_operation.js:4:16)

Is the warning on .15 or .16?

It's an internal issue in mongoose/mongodb drivers

node_modules\mongodb\lib\operations\execute_operation.js:4:16

@EmanSza
Copy link

EmanSza commented Feb 23, 2021

Yeah I still get the warning and after tracing the issue here's the result

node --trace-warnings src/index
(node:14900) 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> (C:\Users\micha\Desktop\????\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> (C:\Users\micha\Desktop\????\node_modules\mongodb\lib\operations\execute_operation.js:4:16)

Is the warning on .15 or .16?

It's an internal issue in mongoose/mongodb drivers

node_modules\mongodb\lib\operations\execute_operation.js:4:16

yes i know its a internal issue but downgarding to .15 should fix the warning

@mikayelgr
Copy link

Yeah I still get the warning and after tracing the issue here's the result

node --trace-warnings src/index
(node:14900) 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> (C:\Users\micha\Desktop\????\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> (C:\Users\micha\Desktop\????\node_modules\mongodb\lib\operations\execute_operation.js:4:16)

Is the warning on .15 or .16?

It's an internal issue in mongoose/mongodb drivers
node_modules\mongodb\lib\operations\execute_operation.js:4:16

yes i know its a internal issue but downgarding to .15 should fix the warning

Well it doesn't seem to work with version .15 either

@vkarpov15 vkarpov15 modified the milestones: 5.11.18, 5.11.19 Feb 23, 2021
@Automattic Automattic locked and limited conversation to collaborators Feb 23, 2021
@vkarpov15 vkarpov15 modified the milestones: 5.11.19, 5.11.20, 5.12.1 Mar 5, 2021
@vkarpov15
Copy link
Collaborator

Fixed by #10038

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
underlying library issue This issue is a bug with an underlying library, like the MongoDB driver or mongodb-core
Projects
None yet
Development

No branches or pull requests

9 participants