From 79e61f00e77256893fc7cd453391e077cf29f356 Mon Sep 17 00:00:00 2001 From: Remy Sharp Date: Thu, 1 Feb 2018 18:19:56 +0000 Subject: [PATCH] fix: sniff for child.stdout before using it This fixes node@6.0.0, but it's a hack, so I'm going to emit a message saying that non-LTS is not supported. --- lib/monitor/run.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/monitor/run.js b/lib/monitor/run.js index 59657506..d33ae416 100644 --- a/lib/monitor/run.js +++ b/lib/monitor/run.js @@ -260,7 +260,12 @@ function run(options) { child.stdin.on('error', () => { }); process.stdin.pipe(child.stdin); } else { - child.stdout.pipe(process.stdout); + if (child.stdout) { + child.stdout.pipe(process.stdout); + } else { + utils.log.error(`running an unsupported version of node ${process.version}`); + utils.log.error('nodemon may not work as expected - please consider upgrading to LTS'); + } } bus.once('exit', function () {