error-inject inject an error listener into a stream Install npm install error-inject Usage var inject = require('error-inject'); var rs = fs.createReadStream('index.js'); inject(rs, error); function error(err) { console.error(err); } License MIT