Information Security with HelmetJS - Understand BCrypt Hashes

Does anyone know why the testcase BCrypt has been properly required fails here ?

Code:

/**********************************************
* 4. Applied InfoSec Challenges
* =============================
***********************************************/

var express = require('express'); // Do Not Edit
var app = express();              // Do Not Edit
var helmet = require('helmet');
var bcrypt = require('bcrypt');

// ----
...

4 Likes

Make sure you are also including dependency in package.json

"helmet" : "^3.12.1"

That’s not the error.
The dependency that it’s required is ‘bcrypt’. I have this dependency, as you can see in the Image the BCrypt dependency Test passes.

You need to start off with the new glitch template for Bcrypt exercises. There should be a new link on the exercise page.

3 Likes

Ok, that makes more sense Thx.
It would be better if it would said something about starting a new project…The challenge is in the same helmet chapter & has the same description about glitch as the helmet challenges…

Yeah I agree. I was stuck here when I started working on the bcrypt exercises.

This is frustrating indeed. The directions for the bcrypt challenges are incomplete.

2 Likes

I can confirm - the solution is to start a new glitch ‘project’.

I have tried different glitch project and I am getting an error

Link to my project: https://sticky-sprout-hibiscus.glitch.me/

BoCode84 try to submit that page, mine also displays “error” in the body however the server side is OK, and test passes.

1 Like

NVM
I guess even though it shows an ERROR, I pass the challenge
Thanks