jaredhanson / jaredhanson/connect-flash

Error: req.flash() requires sessions

Open
#24 1 comment 8 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.2k
Forks
173
PR merge metrics
No merged PRs in 30d

Description

I get this error when I'm trying to use req.flash in my project, I am using express 4.0.0 where all my node modules installed in Windows PC

res.render('login.ejs', { message: req.flash('loginMessage') });

Kindly do the needful to fix this.

Thanks In Advance :)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported res.render call and req.flash('loginMessage') usage, then inspect how Express 4 sessions are configured in the affected project. Reproduce the error and identify the missing session-related setup; done means the flash message renders without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.