我的节点开始表现得很奇怪。所以我删除了它并再次安装它。现在,我不能再犯grunt serve
了
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.
我已使用yo angular
生成了该项目。它在我重新安装节点之前有效。
答案 0 :(得分:9)
以下为我修好了;尝试运行
更新指南针// From the official documentation at http://compass-style.org/install/
gem install compass
cd <myproject>
compass install compass
答案 1 :(得分:1)
如果您想要同时避免使用Ruby和Compass,只需进行一些修改即可添加libsass,如下所示:https://github.com/yeoman/generator-angular/issues/819#issuecomment-100379175
基本上:
1)安装grunt-sass:npm install --save-dev grunt-sass
2)将'compass'命令替换为链接
中的'sass'定义3)在观察者命令中用'sass'替换'compass'
4)在并发命令中用'sass'替换'compass'
希望它从一开始就作为选项添加到生成器中。希望有所帮助!