grunt serve 由于 yeoman mean 中的警告而中止

grunt serve aborted due to warnings in yeoman mean

我正在学习 mean.io 上的教程,在其中我必须安装 yo angular

过了一段时间,一切都安装好了,最后我不得不 运行 `g运行t serve'

然后这个error/warning来了

mukund@mukund-ThinkPad-Edge-E431:~/MeanApp/client$ 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
Warning: Command failed: /bin/sh -c compass --version
/bin/sh: 1: compass: not found
 Use --force to continue.

Aborted due to warnings.


Execution Time (2015-07-16 10:01:13 UTC)
loading tasks                  10ms  ▇▇▇▇ 12%
loading grunt-contrib-compass  33ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇ 40%
compass:server                 38ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 46%
Total 82ms Use --force to continue.

    Aborted due to warnings.


Execution Time (2015-07-16 10:01:12 UTC)
loading tasks                 10ms  ▇ 1%
loading grunt-contrib-clean   10ms  ▇ 1%
clean:server                   9ms  ▇ 1%
wiredep:app                  185ms  ▇▇▇▇▇▇▇▇ 24%
wiredep:test                  10ms  ▇ 1%
wiredep:sass                  12ms  ▇ 2%
loading grunt-concurrent       9ms  ▇ 1%
concurrent:server            515ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 67%
Total 766ms
mukund@mukund-ThinkPad-Edge-E431:~/MeanApp/client$

我遵循了这个教程https://www.youtube.com/watch?v=OhPFgqHz68o

Ans when i 运行 with this command grunt serve --force

我得到了需要的页面@http://localhost/9000/#/ 没有任何样式的页面

您需要安装 compass。它由包含在 angular yeoman 生成器中的 SASS 使用。

如果您安装了 ruby 就可以了。

gem install compass

永远不要使用 --force。它并不真正适用于所有情况,但 grunt 会为每个 error/warning 抛出它,除了致命错误。