问题 Using NodeJS v5.6 I created a file called read-stream.js : const fs = require('fs'), stream = fs.createReadStream(process.argv[2]); stream.on('data', function(chunk) { process.stdout.write(chunk); }); stream.on('error', function(err) { process.stderr.write("ERROR: " + err.message + "\n"); }); and a data file in plain text called target.txt : hello world this is the second line If I do node read-stream.js target.txt the contents of target.txt are printed normally on my console and all is well.