Can not pass the challenge Information Security with HelmetJS - Install and Require Helmet

Tell us what’s happening:

I follow the hint but I can not pass the challenge.
// running tests
helmet version 3.21.3 should be in package.json
// tests completed
Please help me to solve this. thanks

Your code so far

my code:
myapp.js:

var express = require('express');
var app = express();
const helmet = require('helmet');

package.json:

{
"name": "fcc-infosec-challenges",
"version": "0.0.1",
"description": "fcc backend boilerplate",
"main": "server.js",
"scripts": {
"start": "node myApp.js"
},
"dependencies": {
"express": "^4.14.0",
"helmet": "3.21.3"
},
"keywords": [
"node",
"hyperdev",
"express",
"freecodecamp"
],
"license": "MIT"
}

Your browser information:

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

Challenge: Install and Require Helmet

Link to the challenge:

I have just passed the challenge using the code you have provided.

So I am not sure what you are doing wrong here.

I had this error:
1

Oh man, you are copy pasting the wrong link. Copy and paste the link above the mini browser window that shows up when you run the repl.it.
fcc mistake

How to open this link? I only saw console and shell tab in the working area.

It should show up when you click the ‘run’ button on top of the page.

I still can not pass the challenge

Now you get a test timed out error, which means freecodecamp tried to reach your website, but couldn’t do the test quick enough. It could be because your repl.it was not responding.

When I type in the url you have posted to the browser, I also time out.

Make sure your repl.it is running when you submit the url to freeCodeCamp tester.

Thank you very much, I passed the challenge.

1 Like

:partying_face:

Congratz.

Welcome, nhan.

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 (’).