I recognize that there are many similar questions, but none with a solution that I can find.
I am trying to compile Sass and JS but am getting the following error:
Error: spawn ENOTDIR
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1162:11)
at exports.spawn (child_process.js:995:9)
... and so on...
It appears that the choke point is the return sass(...)
statement. My gulpfile.js
looks like this:
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
notify = require('gulp-notify'),
autoprefix = require('gulp-autoprefixer'),
source_sass = 'assets/sass/',
target_css = 'public/css/',
source_js = 'assets/js/',
target_js = 'public/js/';
gulp.task('css', function () {
return sass(source_sass + 'main.scss', {style: 'compressed'})
.pipe(autoprefix('last 10 version'))
.pipe(gulp.dest(target_css))
.pipe(notify('CSS processed.'));
});
gulp.task('js', function () {
return gulp.src(source_js + '**/*.js')
.pipe(gulp.dest(target_js))
.pipe(notify('JS processed.'));
});
gulp.task('watch', function () {
gulp.watch(source_sass + '**/*.scss', ['css']);
gulp.watch(source_js + '**/*.js', ['js']);
});
gulp.task('default', ['css', 'js', 'watch']);
- OS X Yosemite 10.10.3
- Ruby v2.0.0p481
- Gem v2.0.14
- Node v0.12.3
- NPM v2.9.1
- Gulp v3.8.11