Reputation: 611
I just recently copied over my local gulpfile and packages to a server in order to compile sass on the server instead of having to copy the file over everytime I make a change. The gulp tasks worked fine before, but now when I try my gulp css task, I get this error.
Starting 'css'...
events.js:72
throw er; // Unhandled 'error' event
^
Error: Gem undefined is not installed.
Here is my gulpfile. I thought I had all the errors handled, but I guess I missed something. Gulpfiles are so confusing...
var gulp = require('gulp');
var minifycss = require('gulp-cssnano');
var autoprefixer = require('gulp-autoprefixer');
var notify = require('gulp-notify');
var sass = require('gulp-ruby-sass');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('css', function() {
return sass('scss/**/*.scss')
.pipe(sourcemaps.init())
.pipe(autoprefixer())
.pipe(concat('ivie2017.css'))
.on('error', sass.logError)
.pipe(sourcemaps.write())
.pipe(gulp.dest('./css'))
.pipe(notify({ message: 'Wait for it....wait for it!!!' }));
});
gulp.task('default', function() {
gulp.watch('scss/**/*.scss',['css']);
});
Upvotes: 0
Views: 92
Reputation: 611
Ruby gem for Sass was not installed. I ran the command "gem install sass" and afterwards my scss compiled just fine!
Upvotes: 0
Reputation: 1179
Run $ npm install --save-dev gulp-ruby-sass
to install gulp ruby sass.
https://github.com/sindresorhus/gulp-ruby-sass#install
Upvotes: 0