Node.js
Node.js tried to set HTTP headers after they were already sent
Node.js rejected an HTTP response change because the headers had already been written, which usually means the handler responded more than once or wrote too early.
Node.js
Node.js rejected an HTTP response change because the headers had already been written, which usually means the handler responded more than once or wrote too early.
Observed message
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
Why it happens
How to fix it
Official reference
Node.js Errors: ERR_HTTP_HEADERS_SENTRelated errors
Explore more