user463535
user463535

Reputation:

"Error: spawn /usr/bin/compass ENOENT" when using gulp-compass

I'm attempting to run the following Gulp task to compile Sass files, using the plugin, gulp-compass on OS X Yosemite 10.5.5.

var path = require("path");
var gulp = require("gulp");
var compass = require("gulp-compass");

gulp.task("compile2013Base", function() {
    var projectPath = path.join(__dirname, '../../ ');

    gulp.src(['../sass/desktop/css/2013/*.scss']).pipe(compass({
        project: projectPath,
        css: 'htdocs/assets/css/2013/',
        sass: 'sass/desktop/css/2013'
    })).on('error', errorHandler).pipe(gulp.dest('../../htdocs/assets/css/2013/'));
});

function errorHandler (error) {
  console.log(error.toString());
  this.emit('end');
 }

However, when I try to run the task like gulp compile2013Base, I get the following error:

> gulp compile2013Base
[13:39:06] Using gulpfile [**redacted**]/scripts/js/gulpfile.js
[13:39:06] Starting 'compile2013Base'...
[13:39:06] Finished 'compile2013Base' after 9.07 ms
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn /usr/bin/compass ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)

I already have compass installed at /usr/bin/compass, and running compass in the terminal does not show any errors. I'm not sure what to go on here, how do I get the error details?

Upvotes: 1

Views: 2038

Answers (1)

Treeskar
Treeskar

Reputation: 616

This is helped me

sudo gem install -n /usr/local/bin compass

see Error: "compass:dist" Fatal error: spawn /usr/bin/compass ENOENT

Upvotes: 11

Related Questions