Skip to content
New issue

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

Error : TypeError [ERR_INVALID_ARG_TYPE] #178

Open
PLQin opened this issue Jul 20, 2019 · 3 comments
Open

Error : TypeError [ERR_INVALID_ARG_TYPE] #178

PLQin opened this issue Jul 20, 2019 · 3 comments

Comments

@PLQin
Copy link

PLQin commented Jul 20, 2019

执行命令 font-spider *.html 时报错 :

(node:17032) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received type object
    at Url.parse (url.js:150:11)
    at urlParse (url.js:144:13)
    at Url.resolve (url.js:659:29)
    at Object.urlResolve [as resolve] (url.js:655:40)
    at HTMLLinkElement.get [as baseURI] (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\src\node.js:101:28)
    at HTMLLinkElement.get (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\src\elements\html-link-element.js:15:37)
    at Document.get (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\src\document.js:102:56)
    at loadCssFiles (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\src\style\load-css-files.js:15:32)
    at Window.set [as onload] (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\index.js:72:17)
    at start (C:\Users\trimmobi\AppData\Roaming\npm\node_modules\font-spider\node_modules\browser-x\index.js:36:27)
(node:17032) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:17032) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

环境 :
$ node -v
v10.11.0

$ font-spider --version
1.3.5

window10

@PLQin
Copy link
Author

PLQin commented Jul 20, 2019

@aui 老板, 求解答

@coufran
Copy link

coufran commented Aug 7, 2019

我也报同样的错误了,最后发现是有一段不标准的CSS引用,把下面这段去掉好了。
<link webkit="href" type="text/css" rel="stylesheet" _href="css/index-webkit.css"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@coufran @PLQin and others