Search code examples
javascriptsasscompilationgulp

Fail compile Sass with gulp


I have a problem with my code. it will not compile when I write "Gulp sass" in the console, But nothing happened in my CSS folder. I have been sitting for a long time trying to make it work but it won't want to work for me and I am very grateful if anyone can help me with this

Here is the code:

var gulp = require('gulp');
var sass = require('gulp-sass');


// Compile
gulp.task('sass', function() {
    return gulp.src('./src/Assests/scss/*.scss')
        .pipe(sass())
        .pipe(gulp.dest('./src/Assets/css'));
});`

and in the console it says

gulp sass
[10:41:41] Using gulpfile ~\my-app\gulpfile.js
[10:41:41] Starting 'sass'...
[10:41:41] Finished 'sass' after 8.78 ms`

Solution

  • please make sure the name of the folder is correct. Looks like you have 'Assests' instead of 'Assets'. Note the extra 's'