Information security with helmet.js

Tell us what’s happening:
i cannot seem to get past the first lesson i followed the instructions and installed the required version of helmet and also added it to the app.js file as a requirement. But when i paste the link to the lesson it does not work im not sure what link to use to get past the first lesson. The help page for that lesson still imples that we are using glitch, but we are not, we are using Repl.it, so the help page is pointless. please help me.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36.

Challenge: Install and Require Helmet

Link to the challenge:

Hey there,

nice to meet you! :wave:

The workflow is mostly the same:

  1. Add the package to package.json
  2. Require the installed module in myApp.js
  3. Hit the Run button (wait some seconds)
  4. Copy the URL of your live demo and paste it to the FCC field

This is working for me to pass the lesson.

thank you and yes i have tried that various times but no luck i keep getting the same error, " helmet version 3.21.3 should be in package. json file". Although i can clearly see that the correct version of helmet is installed also i am calling it correctly in the app.js file. At this point i believe its an internal problem with the lesson .

1 Like

Hey there,

I just submitted the lesson by using the steps above,
so it shouldn’t be a problem with the lesson.

Can you show us your repl.it project?

here you go. Hopefully this is the correct link.

When you go into package-lock.json,
you can see your actual helmet version: 3.23.3.

The lessons asks for 3.21.3.

This is because you use ^3.21.3 in your package.json.

There is a cause for using ^.

You can read about npm semantic versioning.

3 Likes

Thank you that worked perfectly so what i did was in the Repl.it command i typed

npm i helmet@3.21.3

this installed the correct version of helmet then i went to package.json file and deleted the ^ from the version of helmet. Then i ran the program and copied the live link and it worked. Thank you.

2 Likes

can u tell me what im doing wrong with
this

have you installed all the requirements that it is asking for

yeah got it done, ty
this video helped