Gulp silently shuts down on task returning empty stream
See original GitHub issueWhat were you expecting to happen?
Running gulp all
I expect to see:
[15:27:25] Using gulpfile /var/www/project/gulpfile.js
[15:27:25] Starting 'streams'...
[15:27:25] Finished 'streams' after 1.66 ms
[15:27:25] Starting 'dep'...
dep
[15:27:25] Finished 'dep' after 140 μs
[15:27:25] Starting 'all'...
all
[15:27:25] Finished 'all' after 84 μs
What actually happened?
After starting streams
task gulp silently exits with code 0:
$ gulp all
[15:28:30] Using gulpfile /var/www/project/gulpfile.js
[15:28:30] Starting 'streams'...
[15:28:30] Starting 'dep'...
dep
[15:28:30] Finished 'dep' after 177 μs
$ echo $?
0
Please post a sample of your gulpfile (preferably reduced to just the bit that’s not working)
gulp.task('dep', function () {
console.log('dep')
})
gulp.task('streams', function () {
const streams = require('merge2')()
return streams
})
gulp.task('all', ['streams', 'dep'], function () {
console.log('all')
})
What version of gulp are you using? What versions of npm and node are you using?
$ gulp --version
[15:23:48] CLI version 3.9.1
[15:23:48] Local version 3.9.1
$ npm -v
5.2.0
$ node -v
v7.8.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Does a gulp task have to return anything? - Stack Overflow
If you do not return a stream, then the asynchronous result of each task will not be awaited by its caller, nor any...
Read more >Browsersync options
Browsersync makes your browser testing workflow faster by synchronising URLs, interactions and code changes across multiple devices.
Read more >The Complete Stories - Vanderbilt University
The Complete Stories brings together all of Kafka's stories, from the classic tales such as "The Metamorphosis," "In the Penal Colony" and "The...
Read more >Child process | Node.js v19.3.0 Documentation
Each of the methods returns a ChildProcess instance. ... Closes the IPC channel between parent and child, allowing the child to exit gracefully...
Read more >Childe Harold's Pilgrimage Summary & Analysis
They left England in 1809 and did not return for two years. ... What am I? Nothing: but not so art thou, ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@terinjokes brought up a good point. We already handle this if you are using the separate
gulp-cli
module. Check out https://medium.com/gulpjs/gulp-sips-command-line-interface-e53411d4467 for more details. (Caveat: you might need gulp 4 to have accurate warning messages).@pattyjung you subscribed to the thread and must unsubscribe yourself, none of us can do that for you…