Merging writable node streams into one stream
<p>I have an array of writable streams in a gulp task. I would like to merge them and return one stream. I am using the merge-stream node module to do this. I get the following error though.</p>

<pre><code>[14:22:56] Error: Cannot pipe, not readable
    at WriteStream.Writable.pipe (_stream_writable.js:161:22)
    at add (C:\workspace\mediafly-viewer\desktop\node_modules\merge-stream\index.js:28:12)
    at Array.forEach (native)
</code></pre>

<p>Is merging writable streams supported? If so, how do I go about doing this?</p>

<p>Here is what I tried with promises.</p>

<pre><code>const promises = streams.map(s =&gt; new Promise((resolve, reject) =&gt; s.on('finish', resolve).on('error', reject)));

return Promise.all(promises);
</code></pre>