Advanced Node and Express - Authentication with Socket.IO

Tell us what’s happening:
Describe your issue in detail here.
Everything is well coded but the passport.socketio has become headache I just can’t get where the problem could be, someone kindly guide where necessary



Your project link(s)

solution: boilerplate-advancednode - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; TECNO KD7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36

Challenge: Advanced Node and Express - Authentication with Socket.IO

Link to the challenge:

@kevinSmith @RandellDawson
Kindly look through my code and update me what could be the problem
Thanks in advance?

Did you install the right dependency? Be careful of small details. There can be other packages with very similar names.

I installed the right dependencies but something is still not passing

I don’t know, it’s just that the socket package in your package.json has a dash. Maybe I’m misunderstanding.

As said, you didn’t install the correct package. If you did you would have a passport.socketio folder inside the node_modules folder, which you do not.

Also, running npm install from the shell with that dependency (passport-socketio": "~3.7.0) in package.json should give you an error.

'passport-socketio@~3.7.0' is not in this registry.

Even when npm i passport.socketio
Nothing seems to change just the same as before

Now you have this passportsocketio in your package.json which isn’t correct either.


There are the dependencies what is missing kindly advise

Now you are using a dash again, why?

The package name is passport.socketio

Nothing changed, check the response even after doing whatever you said


I’m not getting that error. Open the Shell tab and run npm i

There is an outstanding PR that has not yet been merged due to some changes that still need to take place on it. There were recent changes to the instructions to this challenge that tells the user the depedencies have already been added but these instruction changes were premature since the boilerplate PR was not merged.

Since the whole point of the changes in the PR were to make sure the package.json already had the correct dependencies, you can take a look at what the package.json file will be once the new PR is merged.

@onyangaemmanuel25 Since you have already installed several wrong packages, I suggest removing the node_modules directory with rm -rf node_modules in the shell tab and also remove. the package-lock.json file. Finally, click the Run button again so all the necessary dependencies get installed.

Also just as an aside, in connection.js you are using process.env.DB but in server.js you are using process.env.MONGO_URI

Thanks for that insight i finally changed my DB with all the dependencies well installed and it passed thanks for your time.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.