Gulp’s gulp-ruby-sass plug-in cannot start and report an error!

  question, ruby

Error reporting:

λ gulp serve
 [18:22:40] Working directory changed to F:\new-gulp-test
 [18:22:41] Using gulpfile F:\new-gulp-test\gulpfile.js
 [18:22:41] Starting 'scss'    ...
 [18:22:41] 'scss' errored after 7.01 ms
 [18:22:41] ReferenceError: scss is not defined
 at Gulp.<anonymous> (F:\new-gulp-test\gulpfile.js:58:15)
 at module.exports (F:\new-gulp-test\node_modules\.npminstall\orchestrator\0.3.7\orchestrator\lib\runTask.js:34:7)
 at Gulp.Orchestrator._runTask (F:\new-gulp-test\node_modules\.npminstall\orchestrator\0.3.7\orchestrator\index.js:273:3)
 at Gulp.Orchestrator._runStep (F:\new-gulp-test\node_modules\.npminstall\orchestrator\0.3.7\orchestrator\index.js:214:10)
 at Gulp.Orchestrator.start (F:\new-gulp-test\node_modules\.npminstall\orchestrator\0.3.7\orchestrator\index.js:134:8)
 at C:\Users\Administrator\AppData\Roaming\npm\node_modules\.gulp_npminstall\gulp\3.9.1\gulp\bin\gulp.js:129:20
 at nextTickCallbackWith0Args (node.js:420:9)
 at process._tickCallback (node.js:349:13)
 at Function.Module.runMain (module.js:443:11)
 at startup (node.js:139:18)

Node_modules directory

clipboard.png

Js configuration

Varminifycss = require ('gulp-minify-css'),//css compression
 Uglify = require ('gulp-uglify'),//js compression
 Concat = require ('gulp-concat'),//merge files
 Rename = require ('gulp-rename'),//rename
 clean = require('gulp-clean');  //Empty folder
 
 var gulp = require('gulp'),
 sass = require('gulp-ruby-sass');
 notify = require('gulp-notify'),
 plumber = require('gulp-plumber');
 browserSync = require('browser-sync').create(),
 reload     = browserSync.reload;
 
 gulp.task('serve', ['scss'], function() {
 browserSync.init({
 server: "./stc"
 });
 gulp.watch("stc/**/*.scss", ['scss']);
 gulp.watch("stc/*.html").on('change', reload);
 });
 gulp.task('scss', function() {
 return gulp.src(['stc/scss/*.scss','!  stc/scss/extend/{reset,test}.scss'])
 .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
 .pipe(scss())
 .pipe(gulp.dest("stc/css"))
 .pipe(reload({stream: true}));
 });
 
 gulp.task('default', ['serve']);

You don’t have a namescssThe variable, look here:

gulp.task('scss', function() {
 return gulp.src(['stc/scss/*.scss','!  stc/scss/extend/{reset,test}.scss'])
 .pipe(plumber({errorHandler: notify.onError('Error: <%= error.message %>')}))
 . pipe(sass()) // not right here, should be sass
 .pipe(gulp.dest("stc/css"))
 .pipe(reload({stream: true}));
 });