So yea, I got stuck. I even decided to simply copy server.js file provided by you guys on GitHub Gist, but I get
const MongoStore = require(‘connect-mongo’)(session);
TypeError: Class constructor MongoStore cannot be invoked without ‘new’
I’ll try to solve this myself of course, but you should look into it.
All dependencies were installed directly from Repl.it, so maybe there’re some issue with newer versions of some of them…
Challenge: Authentication with Socket.IO
Link to the challenge:
We are aware of this issue: Advanced Node and Express - Package Versioning · Issue #39521 · freeCodeCamp/freeCodeCamp (github.com)
The solution is as you suggested - downgrade the package version.
halo. i also found same problem but i downgraded the version of connect-mongo package from v4 to v3
try unistalling connect mongo
npm uninstall connect-mongo
then install connect v3
npm i connect-mongo@3
This worked for me. Thanks.
I would also like to comment that this worked for me after weeks of research on the internet, thanks guys , much appreciate
We are trying to make sure there are no weird bugs in this, and thought we had resolved this issue. So, would you mind elaborating on what you experienced during this challenge?
Specifically, the challenge mentions:
Does this not work for you?
It worked for me, after I downgraded connect-mongo to npm i connect-mongo@3, it worked fine and the above error disappeared, and sessions was running fine on Mongodb
thankyou for helping bro/sis/gf
Thanks dear. It works for me.
I appreciate you and your team.
Worked for me, too. Thanks!!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.