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