Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt serve not working, compass error

My node started to behave odd. So I removed it and installed it again. Now, I cant runt grunt serve anymore

Pers-MacBook-Air:clientMD perstrom$ grunt serve
Running "serve" task

Running "clean:server" (clean) task
>> 0 paths cleaned.

Running "wiredep:app" (wiredep) task

Running "wiredep:test" (wiredep) task

Running "wiredep:sass" (wiredep) task

Running "concurrent:server" (concurrent) task
    Warning: Running "compass:server" (compass) task
    Error: invalid option: --import-path=./bower_components

    Usage: compass compile [path/to/project] [path/to/project/src/file.sass ...] [options]

    Description:
    compile project at the path specified or the current director if not specified.

I've generated the project with yo angular. It worked before I reinstalled node.

like image 873
Joe Avatar asked Feb 12 '15 10:02

Joe


2 Answers

The following fixed it for me; try updating compass by running

// From the official documentation at http://compass-style.org/install/
gem install compass
cd <myproject>
compass install compass
like image 116
robro Avatar answered Sep 20 '22 03:09

robro


If you want to avoid Ruby and Compass all together, you can add libsass with just a few modifications, listed here: https://github.com/yeoman/generator-angular/issues/819#issuecomment-100379175

Basically:

1) Install grunt-sass: npm install --save-dev grunt-sass

2) Replace the 'compass' command with the 'sass' definition in the link

3) Replace 'compass' with 'sass' in the watcher command

4) Replace 'compass' with 'sass' in the concurrent command

Hopefully it'll be added to the generator as an option from the start. Hope that helps!

like image 33
AJ Zane Avatar answered Sep 22 '22 03:09

AJ Zane