2015-12-11 26 views
1

我已經開始在流星項目中使用glyphicons與twbs:boostrap軟件包。自從我開始使用他們,我一直在接受我的控制檯以下警告:流星:未能解碼下載的字體和OTS解析錯誤 - 無效版本標記

Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.woff2 
OTS parsing error: invalid version tag 
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.woff 
OTS parsing error: invalid version tag 
Failed to decode downloaded font: http://localhost:3000/fonts/glyphicons-halflings-regular.ttf 
OTS parsing error: invalid version tag 

是什麼原因造成這一點,我怎麼能抑制這些警告或解決什麼問題? glyphicons工作得很好,但看到警告總是很痛苦。

回答

2

這意味着您用來導入glyphicons的軟件包中存在一個錯誤,並且沒有正確聲明字體文件的位置或沒有正確添加到該軟件包本身的字體文件。

檢查軟件包維護者問題跟蹤,並在此期間,下載glyphicons您public目錄,並在自己的CSS文件中聲明它們。

+0

如何在我的CSS文件中聲明它們以及我可以在哪裏下載glyphicons? –

+0

只需將它們從bootstrap/fonts文件夾複製粘貼到public/fonts文件夾 –

0

在嘗試了很多其他方法以及大量重新安裝和檢查流星加npm配置之後,我剛剛通過清除Chrome瀏覽數據(緩存的圖像和文件)並刷新頁面來解決了這個問題。

相關問題