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

TypeError: Path must be a string. Received null #57

Open
fredericrous opened this issue May 29, 2018 · 1 comment
Open

TypeError: Path must be a string. Received null #57

fredericrous opened this issue May 29, 2018 · 1 comment

Comments

@fredericrous
Copy link

Description

there's an error at each execution of the command line

HTML SUMMARY
✖ 7 problem(s) found

Adding 33 link(s) to the queue...



▶ http://localhost:8000/prices/single-product.html

BASE	single-product.html
STATUS	404 Not Found
ELAPSED	0.01 secs

❯ Checking HTML guidelines...


HTML SUMMARY
✔ no problem found

path.js:7
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received null
    at assertPath (path.js:7:11)
    at Object.basename (path.js:1355:5)
    at runValidator (/usr/local/lib/node_modules/w3c-link-validator/src/w3clink.js:70:22)
    at Request._callback (/usr/local/lib/node_modules/w3c-link-validator/src/w3clink.js:117:13)
    at Request.self.callback (/usr/local/lib/node_modules/w3c-link-validator/node_modules/request/request.js:185:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/w3c-link-validator/node_modules/request/request.js:1157:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)

Steps to Reproduce

  1. npm install w3c-link-validator -g
  2. w3clink check http://localhost:8000

Expected behavior: no error

Actual behavior: error

Reproduces how often: every single time

Versions

Package: 1.0.0

npm: both 3.10.10 & 5.6.0

node: both 6.9.3 & 9.8.0

@ArthurClemens
Copy link

I get this error when the href has a mailto:

rootUrl mailto:[email protected]
urlinfo Url {
  protocol: 'mailto:',
  slashes: null,
  auth: 'support',
  host: 'domain.com',
  port: null,
  hostname: 'domain.com',
  hash: null,
  search: null,
  query: null,
  pathname: null,
  path: null,
  href: 'mailto:[email protected]' }

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

2 participants