We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行 font-spider 时报错
Error: Expecting a function in instanceof check, but got undefined at /Users/works/font_spider/node_modules/font-spider/src/spider/index.js:277:36 at cssRuleListFor (/Users/works/font_spider/node_modules/font-spider/src/spider/index.js:348:21) at FontSpider.eachCssRuleList (/Users/works/font_spider/node_modules/font-spider/src/spider/index.js:330:13) at FontSpider.getWebFonts (/Users/works/font_spider/node_modules/font-spider/src/spider/index.js:276:14) at FontSpider.parse (/Users/works/font_spider/node_modules/font-spider/src/spider/index.js:44:29) at new FontSpider (/Users/works/font_spider/node_modules/font-spider/src/spider/index.js:27:17) at /Users/works/font_spider/node_modules/font-spider/src/spider/index.js:403:20 at process._tickCallback (node.js:369:9)
无论是全局安装,还是当前目录安装都会有这个错误,经过 DEBUG 后发现,window.CSSFontFaceRule is undefined, 在去掉 if 判断后正常
window.CSSFontFaceRule is undefined
if
//if (cssRule instanceof CSSFontFaceRule) { var webFont = WebFont.parse(cssRule); if (webFont) { webFonts.push(webFont); } //}
环境信息如下:
└─┬ font-spider@1.3.3 ├─┬ browser-x@0.0.1-beta6 │ ├── css-mediaquery@0.1.2 │ ├── cssom@0.3.2 │ ├── cssstyle@0.2.37 │ ├── nwmatcher@1.3.9 │ ├── parse5@2.2.3 │ ├── specificity@0.1.6 │ └─┬ verror@1.9.0 │ ├── assert-plus@1.0.0 │ ├── core-util-is@1.0.2 │ └── extsprintf@1.3.0
The text was updated successfully, but these errors were encountered:
v1.3.4 fix bug: #117 #118 #119
6eff197
@aui
1.3.4
这个报这个错误 Error: Expecting a function in instanceof check, but got undefined
Error: Expecting a function in instanceof check, but got undefined
删除上述if可以使用
Sorry, something went wrong.
No branches or pull requests
运行 font-spider 时报错
无论是全局安装,还是当前目录安装都会有这个错误,经过 DEBUG 后发现,
window.CSSFontFaceRule is undefined
, 在去掉if
判断后正常环境信息如下:
The text was updated successfully, but these errors were encountered: