2016-10-04 6 views
1

ではありません私のstyles.scssgulp-sassと、私は次のエラー受け取るとき:gulp.js - dest.onは私がコンパイルしようとしています機能

[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) 

を私はgulp-sassは別のプロジェクトにインストールされ、正しく動作する必要があります - とgulpfile.jsと同じです。つまり、node_modulesフォルダの問題である必要があります。ここで

は、参考のためにgulpfile.js次のとおりです。

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!'); 
}); 

はどうすればこの問題を解決することができますか?あなたの保存先のフォルダに適切に配管するために、

gulp.task('e', function(){ 
    gulp.src('app/admin/assets/sass/*.scss') // ## Not working 
    .pipe(sass()) 
    .pipe(gulp.dest('dist/admin/assets/css')); 
}); 

答えて

7

リンク先は次のように記述する必要があります。

+1

ああ...それは厄介です。私はそれを実現したことはありません - ありがとう! :) –

関連する問題