Passing gulp.src() to gulp.pipe() is erroring
See original GitHub issueMy gulp task:
gulp.task('build', ['sass'], function (done) {
var child = spawn('./node_modules/.bin/r.js', ['-o', 'app/assets/js/app.build.js'], {
stdio: 'inherit'
});
child.on('close', function () {
gulp.src('app/assets/build/js/main.js')
.pipe(gulp.dest('app/assets/build'))
.pipe(gulp.src('app/assets/build/js', {read: false}))
.pipe(plugins.clean())
.on('end', done);
});
});
My error:
stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: write after end
at writeAfterEnd (/Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:145:12)
at Transform.Writable.write (/Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:193:5)
at Stream.ondata (stream.js:51:26)
at Stream.EventEmitter.emit (events.js:95:17)
at queueData (/Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:43:21)
at next (/Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:71:7)
at /Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/map-stream/index.js:85:7
at done (/Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/lib/dest/writeContents/index.js:9:5)
at /Users/callumacrae/Sites/finance-finder/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/graceful-fs.js:102:5
at Object.oncomplete (evalmachine.<anonymous>:107:15)
~/Sites/finance-finder rc-2* 14s
❯ gulp --version
[17:57:19] CLI version 3.8.0
[17:57:19] Local version 3.8.0
Issue Analytics
- State:
- Created 9 years ago
- Comments:39 (10 by maintainers)
Top Results From Across the Web
gulp.dest() is not creating an output file - Stack Overflow
Your first mistake is that you have gotten an incorrect path. In the gulp.src() function, you are passing a path to a folder...
Read more >Developers - Passing gulp.src() to gulp.pipe() is erroring -
Passing gulp.src() to gulp.pipe() is erroring. wearefractal. 11 June 2014 Posted by callumacrae. My gulp task: gulp.task('build', ['sass'], function (done) ...
Read more >How to use the gulp.on function in gulp - Snyk
To help you get started, we've selected a few gulp.on examples, based on ... the build // gulp.task('docs', function() { // return gulp.src(paths.docs) ......
Read more >Catching errors on Gulp.js - Boris - Medium
So, now gulp can get only error from last stream, and usualy it is gulp.dest() call to write the result of task to...
Read more >Converting code to Gulp 4.0 - The freeCodeCamp Forum
src /Assets/css'; //Compile SCSS gulp.task('compile_scss', gulp.parallel(function(){ gulp.src(SCSS_SRC) .pipe(sass().on('error', sass.
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 FreeTop 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
Top GitHub Comments
This is not your problem. Your stack trace says you fed invalid JS to uglify