5

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.

Joe
  • 4,274
  • 32
  • 95
  • 175
  • After re installing node, say `npm install` and `bower install` in your project folder and try again. – Rajeshwar Feb 12 '15 at 11:19
  • @Rajeshwar done that. yo angular does not give any error – Joe Feb 12 '15 at 11:21
  • But `yeoman` is different, `npm` and `bower` is different. If there is any version in compatibles, you wont be able to run it. So after installing `node` again, update `yo, bower and grunt` and try once. If you still face the errors, then use older version of `node` and try. – Rajeshwar Feb 12 '15 at 11:27
  • @Rajeshwar I tried running grunt serve in another previous project and there it worked. So it must be something local. – Joe Feb 12 '15 at 11:29
  • In your new project, you may have installed `bower components and grunt`, with new version of `npm`. So i think there is some in compatibility between the versions. I too faced similar problem, i changes the version of node, and it was working fine. – Rajeshwar Feb 12 '15 at 11:31
  • @Rajeshwar Do I really need to change version of node to fix this? Must be an easier way? – Joe Feb 12 '15 at 14:56
  • Even i tried different ways, but finally changing to old version made the task easy. – Rajeshwar Feb 12 '15 at 14:57

2 Answers2

9

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
robro
  • 1,730
  • 23
  • 26
1

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!

AJ Zane
  • 3,941
  • 1
  • 21
  • 18