Node.js unhandled 'error' event
For me, the problem was another instance was running. Search for other node instance running and kill it. It should resume properly after.
This is happening because nothing is listening on localhost:8080. Here are the examples how to handle request errors How to catch http client request exceptions in node.js
Another server is running on same port 8080, so you need to kill and start your instance.
find running instance
$ netstat -nlp | grep 8080(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.)tcp6 0 0 :::8881 :::* LISTEN 28207/node
kill existing server instance using pid
$ kill -9 28207
start instance
$ node server.js