Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

throw er; // Unhandled 'error' event #2130

Open
philharmonie opened this issue Oct 27, 2017 · 0 comments
Open

throw er; // Unhandled 'error' event #2130

philharmonie opened this issue Oct 27, 2017 · 0 comments

Comments

@philharmonie
Copy link

philharmonie commented Oct 27, 2017

I'm getting this, when I launch "gulp"

spawn called
{ '0': '/usr/local/bin/compass',
  '1': 
   [ 'compile',
     '/Users/philharmonie/Dropbox/server/localhost/charleston',
     '/Users/philharmonie/Dropbox/server/localhost/charleston/assets/sass/app.sass',
     '-c',
     './compass.rb',
     '--no-line-comments',
     '--relative-assets',
     '--css-dir',
     'assets/css',
     '--sass-dir',
     'assets/sass' ],
  '2': { cwd: '/Users/philharmonie/Dropbox/server/localhost/charleston' } }
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /usr/local/bin/compass ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)

Additionally I get
zsh: /usr/local/bin/compass: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin: no such file or directory
when I type "compass"

I'm on high sierra.
Please let me know, if you need more infos.

My gulffile.js

`(function() {
    var childProcess = require("child_process");
    var oldSpawn = childProcess.spawn;
    function mySpawn() {
        console.log('spawn called');
        console.log(arguments);
        var result = oldSpawn.apply(this, arguments);
        return result;
    }
    childProcess.spawn = mySpawn;
})();
// Required
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var compass = require('gulp-compass');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');
var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
//var mainBowerFiles = require('main-bower-files');

// Main Bower Files Tasks
gulp.task('main-bower-files', function() {
    return gulp.src(mainBowerFiles(), { base: './bower_components' })
        .pipe(gulp.dest('app/lib/'))
});

// Scripts Task
gulp.task('scripts', function(){
  gulp.src(['assets/js/**/*.js', '!assets/js/**/*min.js'])
    .pipe(plumber())
    .pipe(rename({suffix:'.min'}))
    .pipe(uglify())
    .pipe(gulp.dest('assets/js'))
    .pipe(reload({stream:true}));
});

// Compass / Sass Tasks
gulp.task('compass', function() {
  gulp.src('./assets/sass/app.sass')
    .pipe(plumber())
    .pipe(compass({
      config_file: './compass.rb',
      css: 'assets/css',
      sass: 'assets/sass'
    }))
    /*.pipe(autoprefixer('last 2 versions'))*/
    .pipe(gulp.dest('assets/css'))
    .pipe(reload({stream:true}));

    gulp.src('./assets/sass/app_admin.sass')
      .pipe(plumber())
      .pipe(compass({
        config_file: './compass.rb',
        css: 'assets/css',
        sass: 'assets/sass'
      }))
      /*.pipe(autoprefixer('last 2 versions'))*/
      .pipe(gulp.dest('assets/css'))
      .pipe(reload({stream:true}));
});

// Browser Task
gulp.task('browser-sync', function() {
  browserSync.init({
        proxy: "http://localhost/charleston"
    });
});

// PHP Tasks
gulp.task('php', function() {
  gulp.src('app/**/**/*.php')
  .pipe(reload({stream:true}));
});

// Watch task
gulp.task('watch', function() {
  gulp.watch(['assets/js/**/*.js', '!assets/js/**/*.js'], ['scripts']);
  gulp.watch('assets/sass/**/*.sass', ['compass']);
  gulp.watch('app/**/**/*.php', ['php']);
});

// Default Task
gulp.task('default', ['browser-sync', 'watch']);
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant