I have looked at some answers here, but I am completely new to this so I wasn't able to understand. Could someone take a look at my code and tell me what could have gone wrong. Also if you could explain what this error means. Attached is a screenshot of my terminal. Here is my gulp.js file:
var gulp = require('gulp'),
gutil = require('gulp-util'),
uglify = require('gulp-uglify'),
sass = require('gulp-ruby-sass'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'),
lr = require('tiny-lr'),
server = lr();
var jsSources = [
'components/scripts/scriptOne.js',
'components/scripts/scriptTwo.js'
];
var sassSources = [
'components/sass/*.scss'
];
gulp.task('js', function () {
gulp.src(jsSources)
.pipe(uglify())
.pipe(concat('scripts.js'))
.pipe(gulp.dest('js'));
});
gulp.task('sass', function () {
gulp.src(sassSources)
.pipe(sass({style: 'expanded', lineNumbers: true}))
.pipe(concat('style.css'))
.pipe(gulp.dest('css'))
.pipe(livereload());
});
gulp.task('watch', function () {
var server = livereload();
gulp.watch(jsSources, ['js']);
gulp.watch(sassSources, ['sass']);
gulp.watch(['js/scripts.js', '*.html'], function (e) {
server.changed(e.path);
});
});
gulp.task('default', ['sass', 'js', 'watch']);
As you are using gulp-ruby-sass, you should call it directly instead of using the gulp.src(), like this:
Alternatively you can require
gulp-sass
instead of thegulp-ruby-sass
.