After I've upgraded the connect-mongo npm, app keeps crashing due to this error: Could you please, to fix this error?
package.json:
"dependencies": {
"connect-mongodb-session": "^2.2.0",
"express": "^4.16.4",
"express-handlebars": "^3.0.2",
"express-session": "^1.16.1",
"mongoose": "^5.5.3",
"uuid": "^3.3.2"
}
app.js
const mongoose = require('mongoose');
const express = require('express');
const session = require('express-session');
const MongoStore = require('connect-mongodb-session');
const store = new MongoStore({
collections: 'sessions',
uri: MONGODB_URI
})
I've tried to change "connect-mongodb-session" versions, didn't help. Can anyone advise a way to fix this?
initialize store with session
var MongoDBStore = require('connect-mongodb-session')(session);