jaredhanson / jaredhanson/connect-flash
Error: req.flash() requires sessions
- 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