2015-12-11 22 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浏览数据(缓存的图像和文件)并刷新页面来解决了这个问题。

相关问题