randylien / generator-react-gulp-browserify

A Yeoman Generator for facebook's React library. It includes gulp, browserify, livereload and famous official Twitter bootstrap Sass version
422 stars 60 forks source link

gulp unhandled error in index.scss (Ruby Sass & Autoprefixer Issue) #65

Closed codeofsumit closed 8 years ago

codeofsumit commented 8 years ago

I just re-cloned my project that's using this generator (I haven't made much changes yet from the default generated files) and I get the following error when I try gulp watch:

[12:39:44] write ./main.css

events.js:142
      throw er; // Unhandled 'error' event
      ^
Error: index.scss:110:14: Unexpected { in decls

problem is: there is no index.scss in my project. So it is some dependency or something (again; i haven't added any dependencies yet).

Weird part: this works perfectly fine on the mac I have setup the project with yo generator-react-browserify. Just when I clone it again, it won't work.

Any ideas where to search for the error or where to handle the error?

codeofsumit commented 8 years ago

current state of debugging, this is causing it:

$.rubySass('./app/styles', {
            style: 'expanded',
            precision: 10,
            loadPath: ['app/bower_components']
        })

ruby sass is installed:

sass -v
Sass 3.4.18 (Selective Steve)
codeofsumit commented 8 years ago

Alright it's the combination of ruby sass and autoprefixer. If I remove either the code in the comment above, or .pipe($.autoprefixer('last 1 version')) - everything works. Still on it!

codeofsumit commented 8 years ago

HA!

$.rubySass('./app/styles', {
            style: 'expanded',
            precision: 10,
            "sourcemap=none": true,    // add this to make it work
            loadPath: ['app/bower_components']
        })

Thanks all 🎉