211085 (2) [Avatar] Offline
Not sure how this is/should be addressed but added res-error

npm install res-error --save 

and added the the following after const app = express():


and it worked fine.
608140 (1) [Avatar] Offline
I had the same problem. I followed what is suggested and then I encounter the following error when I try to send a void form:

POST /post 500 28.089 ms - 42
Error: Can't set headers after they are sent.
    at validateHeader (_http_outgoing.js:491:11)

the error appears while calling

in the middleware.js in the required function