Node error: stdout is not a tty [Fixed]

When you try to pipe output to a file in Windows / msysgit or git bash, you may get this error:

$ node cmd.js >
stdout is not a tty

Rather than writing to the file via shell, do this:

var writable = fs.createWriteStream('', {flags:'w'});
writable.write('mkdir -p ' + path + '\n');
  'curl -o ' + path + + '.txt "' + entry.url + '"\n'

Interested in JavaScript? I send out weekly, personalized emails with articles and conference talks. Click here to see an example and subscribe.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *