Information Security with HelmetJS - Understand BCrypt Hashes

Tell us what’s happening:

This is my code;
var express = require(“express”);

var app = express();

app.disable(“x-powered-by”);

var fs = require(“fs”);

var path = require(“path”);

const bcrypt = require(‘bcrypt’);

var cost = 12;

var myPassword = “password”;

bcrypt.hash(myPassword, cost, function(err, hash) {

if (err) {console.error(“Error hashing password:”, err);

} else {console.log(“Hashed password:”, hash);

}

});

however it keeps failing my 2nd challenge saying i haven’t properly required the Bcrypt yet as per my code it is, and the 1st challenge for dependency passed and hash shows in my terminal. Where could the issue be?

###Your project link(s)

solution: https://3000-freecodecam-boilerplate-t1la3venq3t.ws-eu117.gitpod.io

Your browser information:

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

Challenge Information:

Information Security with HelmetJS - Understand BCrypt Hashes

Am i messing up on the link am loading from? as i keep getting that console error as well, my terminal shows like everything is okay

Restarting ‘myApp.js’
Your app is listening on port 3000
Hashed password: $2b$12$9puOpsJdaISwsHRHif51neZTen7ePdsKr0w8izFY7BeoXSjHFeEbG

You need to use the new starting boilerplate provided on the challenge page.

For the following challenges, you will be working with a new starter project that is different from the previous one. You can find the new starter project on Gitpod, or clone it from GitHub. Learn how to share your Gitpod workspace to get help.

Oh yea you are right. Thanks