broken-link-checker icon indicating copy to clipboard operation
broken-link-checker copied to clipboard

v8-alpha / node v13.8.0: no links found

Open dbogatov opened this issue 5 years ago • 5 comments

Describe the bug

When running against localhost primitive webpage, no links found. Other versions (v0.7.3 at least) work fine for this same webpage.

To Reproduce

docker run -it -v ${PWD}:/code node:13.8.0-alpine3.11 /bin/sh

apk add git curl
git clone https://github.com/stevenvachon/broken-link-checker.git
cd broken-link-checker
npm install
npm run build

npm install -g http-server
http-server /code/website/ -p 8080 & # this part is specific to my website
curl http://localhost:8080/index.html # here you see the HTML (see below)

./bin/blc -r --verbosity 2 http://localhost:8080/index.html

Starting recursive scan...
Getting links from: http://localhost:8080/index.html
Finished! 0 links found.

=======================
Links found: 0
Links skipped: 0
Links OK: 0
Links broken: 0
Time elapsed: 0 seconds
=======================


=======================
Links found: 0
Links skipped: 0
Links OK: 0
Links broken: 0
Time elapsed: 0 seconds
=======================

Expected behavior

(Same as above except version 0.7.3)

Getting links from: http://localhost:8080/index.html
├───OK─── http://localhost:8080/favicon.ico
├───OK─── https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css
├───OK─── https://code.jquery.com/jquery-3.3.1.slim.min.js
├───OK─── https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js
└───OK─── https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js
Finished! 17 links found. 12 excluded. 0 broken.

Environment:

  • OS and version: docker image node:13.8.0-alpine3.11
  • Node.js version: v13.8.0
  • broken-link-checker version: 0.8.0

Actual HTML

Click to reveal
<!doctype html>
<html lang="en">

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<link rel="icon" href="favicon.ico">

		<title>Jumbotron Template for Bootstrap</title>

		<!-- Bootstrap core CSS -->
		<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">

		<style>
			body {
				padding-top: 3.5rem;
			}
		</style>
	</head>

	<body>

		<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
			<a class="navbar-brand" href="#">Navbar</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"><!-- --></span>
			</button>

			<div class="collapse navbar-collapse" id="navbarsExampleDefault">
				<ul class="navbar-nav mr-auto">
					<li class="nav-item active">
						<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
					</li>
					<li class="nav-item">
						<a class="nav-link" href="#">Link</a>
					</li>
					<li class="nav-item">
						<a class="nav-link disabled" href="#">Disabled</a>
					</li>
					<li class="nav-item dropdown">
						<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
						<div class="dropdown-menu" aria-labelledby="dropdown01">
							<a class="dropdown-item" href="#">Action</a>
							<a class="dropdown-item" href="#">Another action</a>
							<a class="dropdown-item" href="#">Something else here</a>
						</div>
					</li>
				</ul>
				<form class="form-inline my-2 my-lg-0">
					<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
					<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
				</form>
			</div>
		</nav>

		<main role="main">

			<!-- Main jumbotron for a primary marketing message or call to action -->
			<div class="jumbotron">
				<div class="container">
					<h1 class="display-3">Hello, world!</h1>
					<p>This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
					<p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more &raquo;</a></p>
				</div>
			</div>

			<div class="container">
				<!-- Example row of columns -->
				<div class="row">
					<div class="col-md-4">
						<h2>Heading</h2>
						<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
						<p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p>
					</div>
					<div class="col-md-4">
						<h2>Heading</h2>
						<p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
						<p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p>
					</div>
					<div class="col-md-4">
						<h2>Heading</h2>
						<p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
						<p><a class="btn btn-secondary" href="#" role="button">View details &raquo;</a></p>
					</div>
				</div>

				<hr>

			</div> <!-- /container -->

		</main>

		<footer class="container">
			<p>&copy; Company 2017-2018</p>
		</footer>

		<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
		<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
	</body>

</html>

dbogatov avatar Feb 18 '20 04:02 dbogatov

Same issue.

SarahFowler73 avatar Mar 17 '20 17:03 SarahFowler73

Yup same here.

RossMurr4y avatar Mar 22 '20 00:03 RossMurr4y

Same here. Broken on localhost but not on deployed site

Noah-Silvera avatar Apr 20 '20 20:04 Noah-Silvera

Same issue here using node 16.14.0 and broken-link-checker 0.7.8.

Here's a screenshot:

image

sarahg avatar May 19 '22 21:05 sarahg

Maybe blc "http://[::1]:3000" might work.

lunar-consultancy avatar May 30 '22 22:05 lunar-consultancy