You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently 404s and exits on a fresh clone of one of my repos.
Steps:
git clone git@github.com:bnb/jsconf-eu-led.git # will clone into jsconf-eu-led
npx linkinator ./jsconf-eu-led # should run against jsconf-eu-led
While testing this, it seems that I discovered the localhost URL's port is dynamic rather than static. I'm... not sure why that would happen, considering the code inside the directory is static and not changing between runs:
Ok - I know what's happening here :) linkinator is expecting you to pass it a path to a static HTML site when you use a local path. It tries to start its own static web server, on a random port, and then navigate the site.
It can also be pointed at a plain ol' URL.
It sounds like you were expecting this to 404 check your README.md - is that correct?
I'm getting a similar error as part of our pipeline. We build to HTML files that are used on a local development server. I'm trying to include linkinator as part of our gulp pipeline, but I sometimes get this as the only result:
Here are the relevant portions of code:
linkChecker.on('pagestart', (fileUrl) => {
currentFile = sanitizeUrl(fileUrl);
});
linkChecker.on('link', (result) => {
console.log(result);
// if (result.state === 'BROKEN') {
// const url = result.url.includes('localhost')
// ? sanitizeUrl(result.url)
// : result.url;
// this.log('linkCheck', `Broken link in ${currentFile}: ${url}`, 'red');
// }
});
const task = () => linkChecker.check({
path: path.resolve(this.epubDir), // this.epubDir is pointing to a local directory
recurse: true,
});
👋 @grumbaut it sounds like your issue may be different, since you're working from generated HTML instead of Markdown (the original issue with this one). Could I trouble you to open a new issue?
Activity
bnb commentedon Jun 9, 2019
And, for what it's worth, there doesn't seem to be any reference to localhost in the directory:
JustinBeckwith commentedon Jun 9, 2019
Ok - I know what's happening here :)
linkinatoris expecting you to pass it a path to a static HTML site when you use a local path. It tries to start its own static web server, on a random port, and then navigate the site.It can also be pointed at a plain ol' URL.
It sounds like you were expecting this to 404 check your README.md - is that correct?
bnb commentedon Jun 9, 2019
Yup, I was expecting it to check the README.md / other Markdown files in the directory 😅
JustinBeckwith commentedon Jun 9, 2019
That's not an unreasonable expectation. Let me look at trying to support it!
grumbaut commentedon Jul 9, 2019
I'm getting a similar error as part of our pipeline. We build to HTML files that are used on a local development server. I'm trying to include linkinator as part of our gulp pipeline, but I sometimes get this as the only result:

Here are the relevant portions of code:
[-]404 on (seemingly) non-existent URL[/-][+]Support link checking of Markdown files[/+]JustinBeckwith commentedon Jul 9, 2019
👋 @grumbaut it sounds like your issue may be different, since you're working from generated HTML instead of Markdown (the original issue with this one). Could I trouble you to open a new issue?
grumbaut commentedon Jul 9, 2019
Done! Thanks!
bnb commentedon Apr 13, 2020
I just ran into this again thinking it was supported and remembered I'd had an issue previously 😅
JustinBeckwith commentedon Dec 3, 2020
Well it took longer than expected, but I finally got around to this 🐢 With version
2.6.0and up, you can now check markdown!That ought to do it! Anyone want to take this for a spin and let me know how it goes?