I'm having problems with getting the error:
events.js:48
throw arguments[1]; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:670:11)
at Object.afterWrite [as oncomplete] (net.js:503:19)
when piping output to head. A simple case to try it out is:
console.log('some string');
... the same for 20 lines
and then node test.js | head
to get the error, which seems to appear in about 70% runs on Ubuntu 12.04. What's the problem?