Reputation: 637
I am attempting to compile my styles.scss
with gulp-sass
when I recieve the following error:
[09:48:49] Starting 'e'...
[09:48:49] 'e' errored after 2.35 ms
[09:48:49] TypeError: dest.on is not a function
at DestroyableTransform.Readable.pipe (D:\Data\Web Development\Repositories\ds-www\node_modules\through2\node_modules\readable-stream\lib\_stream_readable.js:485:8)
at Gulp.<anonymous> (D:\Data\Web Development\Repositories\ds-www\gulpfile.js:44:6)
at module.exports (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:214:10)
at D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:279:18
at finish (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:21:8)
at module.exports (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\lib\runTask.js:60:3)
at Gulp.Orchestrator._runTask (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\Data\Web Development\Repositories\ds-www\node_modules\orchestrator\index.js:214:10)
I have gulp-sass
installed in another project and works correctly - with the same gulpfile.js
which means it must be a problem with in the node_modules
folder.
Here is the gulpfile.js
for reference:
var gulp = require('gulp');
var sass = require('gulp-sass');
gulp.task('e', function(){
gulp.src('app/admin/assets/sass/*.scss') // ## Not working
.pipe(sass())
.pipe('dist/admin/assets/css');
});
gulp.task('default', ['e'], function(){
console.log('Gulp tasks started!');
});
How can I fix this problem?
Upvotes: 1
Views: 5311
Reputation: 19581
Your destination should be written like :
gulp.task('e', function(){
gulp.src('app/admin/assets/sass/*.scss') // ## Not working
.pipe(sass())
.pipe( gulp.dest('dist/admin/assets/css') );
});
In order to pipe properly to your destination folder.
Upvotes: 7