2016-07-15 19 views
0

我正在嘗試構建我的第一個角度應用程序。我使用yeoman和角發電機。與該應用程序運行正常「咕嚕服務」,但是當我跑了「咕嚕打造」過程中有錯誤停止 -grunt構建時出現「損壞的@import」錯誤?

Running "cssmin:generated" (cssmin) task 
Warning: Broken @import declaration of "" Use --force to continue. 

Aborted due to warnings. 

我不知道這是什麼錯誤的原因。我到處尋找,但找不到解決方案。 下面是CSS鏈接 -

<!-- build:css(.) styles/vendor.css --> 
    <!-- bower:css --> 
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> 
    <link rel="stylesheet" href="bower_components/animate.css/animate.css" /> 
    <!-- endbower --> 
    <!-- endbuild --> 
    <!-- build:css(.tmp) styles/main.css --> 
    <link rel="stylesheet" href="styles/main.css"> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> 
    <link href="https://fonts.googleapis.com/css?family=Bungee|Carrois+Gothic+SC|Oswald" rel="stylesheet"> 
    <base href="/"> 
    <!-- endbuild --> 
+0

您在該文件中導致問題的'@ import'句子。但既然你不與我們分享,我們無法幫助你。我投這個關閉作爲offtopic>爲什麼不是這個代碼工作。 –

+0

我很確定我沒有在我的代碼中的任何位置寫入@import。我沒有共享代碼的問題,但有很多,所以我不確定哪部分顯示在這裏會有用。 – doctorsherlock

回答

0

我發現錯誤,我不得不改變鏈接標籤的位置。 它應該是 -

<!-- build:css(.) styles/vendor.css --> 
    <!-- bower:css --> 
    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" /> 
    <link rel="stylesheet" href="bower_components/animate.css/animate.css" /> 
    <!-- endbower --> 
    <!-- endbuild --> 
    <!-- build:css(.tmp) styles/main.css --> 
    <link rel="stylesheet" href="styles/main.css"> 
    <!-- endbuild --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css"> 
    <link href="https://fonts.googleapis.com/css?family=Bungee|Carrois+Gothic+SC|Oswald" rel="stylesheet"> 
    <base href="/"> 

現在grunt build運行正常。因此,只有main.css文件必須放在<!-- build:css(.tmp) styles/main.css --><!-- endbuild -->之間