Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error

currently, I am working with node js and MongoDB I have been set up everything properly but when I was trying to run the server using npm start via terminal it shows me the warning which is like the below screen-shot:

I was a little confused why it h…


This content originally appeared on DEV Community and was authored by Osman Forhad

currently, I am working with node js and MongoDB I have been set up everything properly but when I was trying to run the server using npm start via terminal it shows me the warning which is like the below screen-shot:
Alt Text
I was a little confused why it happens when I try to find out my node and npm version like the below screen-shot:
Alt Text
and I also check my package.json file which is like the below screen-shot:
Alt Text
and now finally I realize why this is happening:
Note: This is caused by a deprecation in the current version. Install the previous 5.11.15 version like this
so to solve this warning I installed again mongooses which exect like my package. jon file: to install mongoose again as like the package.json file versions I was type the below command on my terminal:
npm i mongoose@5.11.15
and then again I type npm start on my terminal now everything is okay. which is below screen-shot:
Alt Text
there is no warning.
.
Note: here 5.11.15 is my current version which is my package.json file showing me.
so in the future, if package.json show me the mongoose version is npm i mongoose@5.11.16 or any other then I should install like exact same version npm i mongoose@5.11.16
.
that's it.
.
Happy Coding.
osman forhad
Mobile & Web Application Developer?


This content originally appeared on DEV Community and was authored by Osman Forhad


Print Share Comment Cite Upload Translate Updates
APA

Osman Forhad | Sciencx (2021-03-11T11:22:12+00:00) Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error. Retrieved from https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/

MLA
" » Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error." Osman Forhad | Sciencx - Thursday March 11, 2021, https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/
HARVARD
Osman Forhad | Sciencx Thursday March 11, 2021 » Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error., viewed ,<https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/>
VANCOUVER
Osman Forhad | Sciencx - » Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/
CHICAGO
" » Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error." Osman Forhad | Sciencx - Accessed . https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/
IEEE
" » Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error." Osman Forhad | Sciencx [Online]. Available: https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/. [Accessed: ]
rf:citation
» Warning: Accessing non-existent property ‘MongoError’ of module exports inside circular dependency (Solution) mongoose error | Osman Forhad | Sciencx | https://www.scien.cx/2021/03/11/warning-accessing-non-existent-property-mongoerror-of-module-exports-inside-circular-dependency-solution-mongoose-error/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.