Open pearmaster opened 8 years ago
source code snippet:
return gulp.src(sourceIndexingFile)
// .pipe(replaceContent(/^([\s\S])*?(\n\s*export\b)/, 'export'))
.pipe(through('we are removing heading part', (file, config) => {
console.log('v'.repeat(30));
console.log(file);
console.log('^'.repeat(30));
}))
.pipe(/* ... */);
console log:
D:\[omitted path here]\node_modules\thunks\index.js:385
else throw error
^
TypeError: dest.on is not a function
at DestroyableTransform.Readable.pipe (D:\[omitted path here]\node_modules\vinyl-fs\node_modules\readable-stream\lib\_stream_readable.js:516:8)
at evaluateIndexingLESSFileContentViaTSXFile (D:\[omitted path here]\toolchain\lib\gulp-tasks\css-compile-less-in-multi-themes.js:40:10)
at Gulp.gulp.task (D:\[omitted path here]\gulp-tasks\css-compile-less-in-multi-themes.js:87:34)
at module.exports (D:\[omitted path here]\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\[omitted path here]\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\[omitted path here]\node_modules\orchestrator\index.js:214:10)
at Gulp.Orchestrator.start (D:\[omitted path here]\node_modules\orchestrator\index.js:134:8)
at D:\[omitted path here]\node_modules\gulp-sequence\index.js:68:12
at apply (D:\[omitted path here]\node_modules\thunks\index.js:355:38)
at tryRun (D:\[omitted path here]\node_modules\thunks\index.js:225:19)
at runThunk (D:\[omitted path here]\node_modules\thunks\index.js:218:15)
at D:\[omitted path here]\node_modules\thunks\index.js:315:49
at apply (D:\[omitted path here]\node_modules\thunks\index.js:355:38)
at tryRun (D:\[omitted path here]\node_modules\thunks\index.js:225:19)
at runThunk (D:\[omitted path here]\node_modules\thunks\index.js:218:15)
at continuation (D:\[omitted path here]\node_modules\thunks\index.js:165:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
I'm trying to use gulp-through, but when I run my gulp task, it complains that the transform method "has no method 'on'".
Here is my gulp task:
And here is the error message I get when I run it in gulp version 3.8.11: