billowdev / mineimages-react

simple react app | Project implementation be part of the Web Development Course
0 stars 0 forks source link

ERR_HTTP_HEADERS_SENT on Order.js router #21

Closed billowdev closed 2 years ago

billowdev commented 2 years ago
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:371:5)
    at ServerResponse.setHeader (node:_http_outgoing:576:11)
    at ServerResponse.header (D:\GitHub\mineimages\server\node_modules\express\lib\response.js:776:10)
    at ServerResponse.send (D:\GitHub\mineimages\server\node_modules\express\lib\response.js:170:12)
    at ServerResponse.json (D:\GitHub\mineimages\server\node_modules\express\lib\response.js:267:15)
    at D:\GitHub\mineimages\server\routes\Orders.js:52:7
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_HTTP_HEADERS_SENT'
}
[nodemon] app crashed - waiting for file changes before starting...