[英]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中遇到了同樣的問題,我這樣做是為了解決我的問題:
sudo apt-get install ruby
sudo apt-get install ruby-compass
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.