Hi,
I m facing a badly weird issue which i can t tell if it s a bug, or an
error from my side.
Basically, i m doing
console.log('some long data...');
process.exit(0)
The problem is that the console.log won t display the whole data.
It will stop somewhere in the middle and exit.
I noticed this happens only when i involve a stream parser made on top of
`mississippi`
A simple and regular code like this works fine,
var data = require('fs').readFileSync('fixtures/user')
console.log(JSON.stringify({d:data}, null, 2));
process.exit(0)
this enhanced version which parse the file content via a stream will not
work correctly
var spDs = require('./sp-dscacheutil.js');
var data;
var stream = spDs()
.on('error', function () {
console.log('error')
})
.on('end', function () {
console.error('end');
console.log("%j", data);
process.exit(0);
}).on('data', function (d) {
data = d;
});
require('fs').createReadStream('fixtures/user').pipe(stream)
The stream parser is available here
https://github.com/mh-cbon/dscacheutil/blob/master/sp-dscacheutil.js
I reproduced the problem on
node 6.1/6.2
systems fedora23/yosemite
Looking for help !
Thanks !
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/e90a1c89-2dc7-474a-91f3-40cf839739bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.