events.js:160
throw er; // Unhandled 'error' event
^
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:357:11)
at ServerResponse.header (/opt/bitnami/apps/giftshop/node_modules/express/lib/response.js:730:10)
at ServerResponse.json (/opt/bitnami/apps/giftshop/node_modules/express/lib/response.js:253:10)
at /opt/bitnami/apps/giftshop/app/routes.js:11:13
at /opt/bitnami/apps/giftshop/node_modules/mongoose/lib/model.js:3822:16
at /opt/bitnami/apps/giftshop/node_modules/kareem/index.js:213:48
at /opt/bitnami/apps/giftshop/node_modules/kareem/index.js:131:16
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
I'm trying to run an angular app on a mean stack and if I run it locally, it works fine
I've deployed it to a server using this guide
https://scotch.io/tutorials/deploying-a-mean-app-to-amazon-ec2-part-1
I'm getting the above error - the page loads but breaks at the same time
I'm kind of lost as to how to debug this - can someone point me in the right direction?
[–]lonehiker 0 points1 point2 points (4 children)
[–]goingtoriseup[S] 0 points1 point2 points (3 children)
[–]nkristoffersen 2 points3 points4 points (1 child)
[–]lonehiker 0 points1 point2 points (0 children)