Thanks Christian, This article very useful. I had problem with “request.flash('loginError', 'Please try again!'); ” I cannot call flash method in request , Does anyone has same problem?
I experienced a similar issue. In my case I was getting the following error log:
property 'flash' does not exist on type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
I realized I'd neglected to install the corresponding types package for connect-flash (@types/connect-flash) which resolved the issue for me.
connect-flash
@types/connect-flash
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks Christian, This article very useful. I had problem with “request.flash('loginError', 'Please try again!'); ” I cannot call flash method in request , Does anyone has same problem?
I experienced a similar issue. In my case I was getting the following error log:
I realized I'd neglected to install the corresponding types package for
connect-flash
(@types/connect-flash
) which resolved the issue for me.