currently following a tutorial from the man Brad Traversy about coding an interactive WebApp with node.js and I've run into a problem, that still consists when I paste his github code btw.
const MongoStore = require("connect-mongo")(session)
I'm using connect-mongo to store session data, but the require just doesn't work and it throws this error:
TypeError: Class constructor MongoStore cannot be invoked without 'new'
could someone help me with a brief explanation and a block of code to fix this, because I've looked through several similar questions on stackoverflow, but didn't really understand it.
Cheers