-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
It seems a ~10,000 file count in the src of a gulp.src().pipe(gulp.dest()) task
overflows the stack:
/Users/tom/gulp.test/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:0
(function (exports, require, module, __filename, __dirname) { /*jshint node:tr
^
RangeError: Maximum call stack size exceeded
I got this with a dir containing 8072 regular files in 207 dirs. I can recreate the
error with simple synthetic test cases and this gulpfile:
var gulp = require('gulp');
gulp.task('default', function () {
return gulp.src('foo/**')
.pipe(gulp.dest('bar'));
});Sometimes the gulp task fails only on a second run, after the bar directory is
populated. In other words, sometimes this triggers the error:
rm -rf bar && gulp
while sometimes it doesn't but this does:
rm -rf bar && gulp
gulp
The "sometimes" seems to depends on the content of foo but that's all I know.
Feel free to experiment using my test case generator.
Metadata
Metadata
Assignees
Labels
No labels