You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im currently running into a "UnhandledPromiseRejectionWarning: Error: cyclic dependency detected" when setting up connect-mongo.
Here is my current code:
var session = require("express-session");
var MongoStore = require('connect-mongo')(session);
mongoose.connect("mongodb+srv://x:x@cluster0-anqkh.mongodb.net/H2Oil?retryWrites=true");
app.use(session({
secret: 'keyboard cat',
resave: false,
store: new MongoStore({ mongooseConnection: mongoose.connection }),
saveUninitialized: false
}));
As for the error logged in the console:
(node:11984) UnhandledPromiseRejectionWarning: Error: cyclic dependency detected
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:331:34)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
(node:11984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hope you can help. Thanks!
The text was updated successfully, but these errors were encountered:
The MongoDB version of every node in the cluster must be 3.6 or greater, and the featureCompatibilityVersion of each node in the cluster must be 3.6 or greater.
In the time of your writing, this library is not yet support mongodb 3.6.
We have added MongoDB 3.6 support in lastest commit and still waiting to publish
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey!
Im currently running into a "UnhandledPromiseRejectionWarning: Error: cyclic dependency detected" when setting up connect-mongo.
Here is my current code:
As for the error logged in the console:
(node:11984) UnhandledPromiseRejectionWarning: Error: cyclic dependency detected
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:331:34)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
at serializeObject (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:345:18)
at serializeInto (C:\Users\João\Desktop\GitHub\Web_Project_F-J\node_modules\bson\lib\bson\parser\serializer.js:934:17)
(node:11984) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:11984) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hope you can help. Thanks!
The text was updated successfully, but these errors were encountered: