To match the tutorial exactly, make sure you're installing the same package versions listed in its package.json file:
https://github.com/kimkimani/Nodejs-Authentication-using-Sessions/blob/main/package.json
{
"name": "project",
"version": "1.0.0",
"description": "Node.js authentication using sessions and Redis",
"main": "index.js",
"scripts": {
"dev": "nodemon index.js"
},
"keywords": ["authentication", "express", "redis", "session", "nodejs"],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^5.0.1",
"connect-redis": "^6.1.3",
"ejs": "^3.1.6",
"express": "^4.17.3",
"express-session": "^1.17.2",
"mongoose": "^6.2.9",
"redis": "^4.0.6"
},
"devDependencies": {
"nodemon": "^2.0.15"
}
}