Information secruity, wrong helmet version being installed

Tell us what’s happening:
Describe your issue in detail here.

Your project link(s)

solution: https://replit.com/@christophergou1/boilerplate-infosec-15

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0.

Challenge: Install and Require Helmet

Link to the challenge:

for whatever reason everytime i install helmet, package.json is saying it has the latest version of 4.6.0 rather than 3.23.3. I have done this multiple times and have used the command " npm install helmet@3.23.3" yet it is still saying i have 4.6.0

also upodated my code in the myApp.js file to:

var express = require('express');

var helmet = require('helmet');

var app = express();

app.use(helmet());

//

anyone out there that can help? im using replit

What command line instruction are you using to install it:

Note the instructions:

Install Helmet version 3.21.3 , then require it. You can install a specific version of a package with npm install --save-exact package@version , or by adding it to your package.json directly.

That is telling you exactly how to do it and specify the exact version number - something we have to do sometimes with packages - sometimes we don’t want the latest version.

1 Like

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

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