Title: gulp compass issue
Last modified: June 20, 2017

---

# gulp compass issue

 *  [yashitamittal11](https://wordpress.org/support/users/yashitamittal11/)
 * (@yashitamittal11)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/gulp-compass-issue/)
 * _[ Moderator note: [moved to Fixing WordPress](https://wordpress.org/support/topic/before-posting-in-everything-wordpress/?view=all).]_
 * I am using Gulp to compile sass and trying to incorporate gulp-compass plugin.
   
   When I start the task by writing ‘gulp’ on the command line, the webpage loads.
   But when I make changes to .scss files and the gulp-compass watch task runs, 
   it throws an error.
 * **Individual stylesheets must be in the sass directory.**
 *     ```
       [12:51:41] { [Error: Compass failed]
         message: 'Compass failed',
         showStack: false,
         showProperties: true,
         plugin: 'gulp-compass',
         __safety: { toString: [Function: bound ] } }
       ```
   
 * This is my gulpfile.js
    **Gulpfile.js** var themename = ‘starter-theme’;
 * var gulp = require(‘gulp’),
    // Prepare and optimize code etc //autoprefixer 
   = require(‘autoprefixer’), browserSync = require(‘browser-sync’).create(), compass
   = require(‘gulp-compass’), image = require(‘gulp-image’), jshint = require(‘gulp-
   jshint’), gutil = require(‘gulp-util’), //postcss = require(‘gulp-postcss’), 
   sass = require(‘gulp-sass’), sourcemaps = require(‘gulp-sourcemaps’),
 *  // Only work with new or updated files
    newer = require(‘gulp-newer’),
 *  // Name of working theme folder
    root = ‘../’ + themename + ‘/’, scss = root
   + ‘sass/’, sassSources = scss + ‘style.scss’, js = root + ‘js/’, img = root +‘
   images/’, languages = root + ‘languages/’; sassStyle = ‘expanded’;
 * // Start the gulp-compass task
    gulp.task(‘compass’, function() { gulp.src(sassSources).
   pipe(compass({ sass: scss, css: root, style: sassStyle, require: [‘susy’, ‘breakpoint’]}).
   on(‘error’, gutil.log)) .pipe(gulp.dest(root)); });
 * // Optimize images through gulp-image
    gulp.task(‘images’, function() { return
   gulp.src(img + ‘RAW/**/*.{jpg,JPG,png}’) .pipe(newer(img)) .pipe(image()) .pipe(
   gulp.dest(img)); });
 * // JavaScript
    gulp.task(‘javascript’, function() { return gulp.src([js + '*.
   js']) .pipe(jshint()) .pipe(jshint.reporter(‘default’)) .pipe(gulp.dest(js));});
 * // Watch everything
    gulp.task(‘watch’, function() { browserSync.init({ open:‘
   external’, proxy: ‘localhost’, port: 8080 }); gulp.watch([root + ‘**/*.css’, 
   root + ‘**/*.scss’ ], [‘compass’]); gulp.watch(js + ‘**/*.js’, [‘javascript’]);
   gulp.watch(img + ‘RAW/**/*.{jpg,JPG,png}’, [‘images’]); gulp.watch(root + ‘**/*’).
   on(‘change’, browserSync.reload); });
 * // Default task (runs at initiation: gulp –verbose)
    gulp.task(‘default’, [‘watch’]);
 * I am using these versions
    **Gulp**: CLI version 3.9.1 Local version 3.9.1 **
   gulp-compass**: ^2.1.0
 * I have read many articles online to resolve this issue, but they don’t seem to
   work.
    This is the screenshot of my folder structure: [WordPress theme dtructure](http://imgur.com/a/DSvDp)

Viewing 1 replies (of 1 total)

 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/gulp-compass-issue/#post-9243450)
 * You’re probably going to be better off asking at a place like [StackOverflow](https://stackoverflow.com/)
   instead.

Viewing 1 replies (of 1 total)

The topic ‘gulp compass issue’ is closed to new replies.

## Tags

 * [gulp](https://wordpress.org/support/topic-tag/gulp/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/gulp-compass-issue/#post-9243450)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
