stevenvachon / broken-link-checker

Find broken links, missing images, etc within your HTML.
MIT License
1.97k stars 305 forks source link

TypeError: Cannot read property '0' of null #102

Closed goldingdamien closed 6 years ago

goldingdamien commented 6 years ago

Tested like in the example, but got the following error. Any ideas?

$ blc http://theopenweb.info -ro
C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\node_modules\urlobj\lib\parseUrl.js:124
                        if (url.search[0] === "?")
                                      ^

TypeError: Cannot read property '0' of null
    at Object.parseUrl [as parse] (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\node_modules\urlobj\lib\parseUrl.js:124:18)
    at getRobotsTxt (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\lib\internal\getRobotsTxt.js:13:15)
    at item (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\lib\public\SiteChecker.js:43:5)
    at callHandler (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\node_modules\limited-request-queue\lib\index.js:130:12)
    at startNext (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\node_modules\limited-request-queue\lib\index.js:265:4)
    at RequestQueue.enqueue (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\node_modules\limited-request-queue\lib\index.js:64:3)
    at SiteChecker.enqueue (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\lib\public\SiteChecker.js:150:27)
    at run (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\lib\cli.js:505:11)
    at cli.input (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\lib\cli.js:161:3)
    at Object.<anonymous> (C:\Users\user\AppData\Roaming\npm\node_modules\broken-link-checker\bin\blc:3:31)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
Zauberbutter commented 6 years ago

This is a problem with UrlObj: https://github.com/stevenvachon/urlobj/issues/5

goldingdamien commented 6 years ago

Any idea on when a fix will come? That library seems to not be so popular. Will it be updated?

stevenvachon commented 6 years ago

Fixed in v0.7.8