Tell us what’s happening:
Describe your issue in detail here.
I added the dependencies for passport.socketio@~3.7.0 , connect-mongo@~3.2.0 , and cookie-parser@~1.4.5 and now there is a whole bunch of errors. Cannot load all these modules. I spend hours searching for the mistake. Even cloned the project again, same result. I even tried all the (older) versions they suggest in the description. To no avail. I am a bit desperate.
Please note: passport-socketio is not the same as passport.socketio.
Also, I am not sure what is your latest code, but the versioning should be using the tilde (~), not the caret (^) - patch vs minor versioning.
EDIT: For any further issues, it looks like it could be a limitation of Glitch - preset to use a deprecated Node version, and upgrading takes some know-how. The easiest approach might be to use a different service like CodeSandbox or Replit.
I have been changing a lot indeed on the code. Sorry for that. I was trying all kinds of things. Thanks for the tip on tilde vs. caret. and for spotting the typo in passport.socketio
Question: why should one use tilde and not caret?
Thanks also for suggesting CodeSandBox or Replit.
Remark: I restarted the project using VS Code and deploying the site via Heroku.
I encourage you to research into this topic. Searching “npm versioning” should yield quite a few results.
As for why use a tilde over a caret in the freeCodeCamp curriculum - it is safer to allow some version updates (patches) which make no structural changes to the library/package, as this ensures the way the freeCodeCamp tests interact with the library/package is consistent. Minor updates (tilde) have been known to break the freeCodeCamp tests - so, we decided to avoid them.
Brilliant! I believe you will learn a lot of useful skills going this route. Personally, this is what I did, and I found it useful to think of these challenges as an excuse to explore where/how to host fullstack applications.
No worries. I still recommend exploring this avenue of developing, though.