2015-10-28 141 views
1

我試圖在OS X Yosemite 10.5.5上運行以下Gulp任務來編譯Sass文件,使用插件,gulp-compass。使用gulp-compass時出現「spawn/usr/bin/compass ENOENT」

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'); 
} 

然而,當我嘗試運行任務像gulp compile2013Base,我得到以下錯誤:

> 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) 

我已經安裝路徑是/ usr/bin中/指南針羅盤,並在運行compass終端不顯示任何錯誤。 我不確定這裏要做什麼,如何獲取錯誤詳細信息?

回答

相關問題