繁体   English   中英

警告:运行“指南针:服务器”(指南针)任务

[英]Warning: Running “compass:server” (compass) task

D:\Projects\mallspk>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: 'compass.bat' is not recognized as an internal or exter
nal command,
    operable program or batch file.
     Use --force to continue.

我安装了Yo angular并运行以下命令:

npm install grunt --save-dev
npm install -g grunt-contrib-compass 
npm install -g compass
npm install
bower install
npm install  grunt-google-cdn

当我运行命令grunt serve时,我遇到了这个错误。 我有最新的节点和npm安装与最新的grunt和哟。

我有ruby安装@squiroid。 我忘了运行gem install compass 这对我有用。

我在ubuntu中遇到了同样的问题,我这样做是为了解决我的问题:

  1. sudo apt-get install ruby
  2. sudo apt-get install ruby-compass
  3. sudo gem install compass

在那个grunt serve工作之后

我有同样的问题我在我的桌面上安装指南针宝石,它已解决。

如果你在OS X或Linux上,你可能已经安装了Ruby; 在你的终端用ruby -v测试。 当您确认已安装Ruby时,请运行gem update --system && gem install compass以安装Compass和Sass。

对于Windows,您可以下载ruby然后安装指南针。

希望能帮助到你 :)

我搜索和搜索......直到最后我得到了这个问题的答案。
在我的情况下,它发生在我用yeomen创建一个新的angularjs应用程序时。

这个答案特定于Windows用户

第1步:安装ruby http://rubyinstaller.org/downloads/

第2步:下载rubygems链接: https ://rubygems.org/rubygems/rubygems-2.6.8.zip

第3步:解压缩rubygems-2.6.8.zip

步骤4:打开powershell(终端/命令行)到rubygems-2.6.8文件夹路径。(文件夹的位置,例如.c:\\ folder \\ folder)

步骤5:在powershell终端中运行这些命令

> ruby setup.rb

> gem install compass

请享用!

我有同样的问题

带有sass选项的“yo angular”将使用指南针,这是一颗红宝石。

安装红宝石和指南针

在windows系统中,我们还需要设置ruby的路径。 将ruby / bin添加到路径中

然后“咕噜咕噜”的作品!

我也有这些问题,我通过将源映射设置为false来找到临时修复。

server: {
        options: {
          sourcemap: false <--
        }
      }

之后,它就像魅力一样。

grunt-contrib-compass的文件中可以看出:

“此任务要求您安装Ruby,Sass和Compass> = 1.0.1”和“当您确认已安装Ruby时,运行gem update --system && gem install compass以安装Compass和Sass。”

我按照这条指令修正了警告。

如果你在使用node + express + Angluar时对Ruby有同样奇怪的感觉,请运行“yo angular xyz”,但使用gulp而不是grunt。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM