Open ehmicky opened 4 years ago
────────────────────────────────────────────────────────────────
Plugin "netlify-plugin-checklinks" internal error
────────────────────────────────────────────────────────────────
Error message
UnhandledRejection: a promise was rejected but not handled: TypeError: Cannot read property 'startsWith' of null
This error occurs on the build of a Hugo site once I enable the checklinks plugin. It happens all the time. I've tried some non-default entryPoints settings but this only resulted in 0 tests being run when I choose a non-existing entry-point.
Can I enable more debug output to check why this fails? Any other pointers how to resolve this?
The following is my netlify.toml
file:
[build.environment]
HUGO_VERSION = "0.74.3"
[build]
publish = "public/"
[context.production]
command = "hugo --minify"
[[headers]]
for = "/*"
[headers.values]
cache-control = "public, max-age=600, must-revalidate"
referrer-policy = "strict-origin-when-cross-origin"
x-frame-options = "DENY"
[context.deploy-preview]
command = "hugo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL"
[[plugins]]
package = "netlify-plugin-checklinks"
Full Netlify deploy log:
3:02:41 PM: Build ready to start
3:02:43 PM: build-image version: 53b83b6bede2920f236b25b6f5a95334320dc849
3:02:43 PM: build-image tag: v3.6.0
3:02:43 PM: buildbot version: 8ae026ef4905d9174e416775c6b64aa19950569b
3:02:43 PM: Fetching cached dependencies
3:02:43 PM: Starting to download cache of 327.6MB
3:02:44 PM: Finished downloading cache in 1.399035818s
3:02:44 PM: Starting to extract cache
3:02:50 PM: Finished extracting cache in 5.909210449s
3:02:50 PM: Finished fetching cache in 7.401432249s
3:02:50 PM: Starting to prepare the repo for build
3:02:52 PM: Preparing Git Reference merge-requests/110/head
3:02:57 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus 'public/' in the Netlify UI
3:02:57 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'hugo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL' versus 'hugo' in the Netlify UI
3:02:57 PM: Starting build script
3:02:57 PM: Installing dependencies
3:02:57 PM: Python version set to 2.7
3:02:58 PM: Started restoring cached node version
3:03:01 PM: Finished restoring cached node version
3:03:02 PM: v12.18.0 is already installed.
3:03:02 PM: Now using node v12.18.0 (npm v6.14.4)
3:03:02 PM: Started restoring cached build plugins
3:03:02 PM: Finished restoring cached build plugins
3:03:03 PM: Attempting ruby version 2.7.1, read from environment
3:03:04 PM: Using ruby version 2.7.1
3:03:04 PM: Using PHP version 5.6
3:03:04 PM: Installing Hugo 0.74.3
3:03:04 PM: Hugo Static Site Generator v0.74.3-DA0437B4/extended linux/amd64 BuildDate: 2020-07-23T16:30:30Z
3:03:04 PM: Started restoring cached go cache
3:03:04 PM: Finished restoring cached go cache
3:03:04 PM: go version go1.14.4 linux/amd64
3:03:04 PM: go version go1.14.4 linux/amd64
3:03:04 PM: Installing missing commands
3:03:04 PM: Verify run directory
3:03:06 PM:
3:03:06 PM: ────────────────────────────────────────────────────────────────
3:03:06 PM: Netlify Build
3:03:06 PM: ────────────────────────────────────────────────────────────────
3:03:06 PM:
3:03:06 PM: ❯ Version
3:03:06 PM: @netlify/build 8.0.0
3:03:06 PM:
3:03:06 PM: ❯ Flags
3:03:06 PM: deployId: 5ff32001ce812000086b73ca
3:03:06 PM: mode: buildbot
3:03:06 PM:
3:03:06 PM: ❯ Current directory
3:03:06 PM: /opt/build/repo
3:03:06 PM:
3:03:06 PM: ❯ Config file
3:03:06 PM: /opt/build/repo/netlify.toml
3:03:06 PM:
3:03:06 PM: ❯ Context
3:03:06 PM: deploy-preview
3:03:06 PM:
3:03:06 PM: ❯ Loading plugins
3:03:06 PM: - netlify-plugin-checklinks@4.1.1 from netlify.toml
3:03:08 PM:
3:03:08 PM: ────────────────────────────────────────────────────────────────
3:03:08 PM: 1. build.command from netlify.toml
3:03:08 PM: ────────────────────────────────────────────────────────────────
3:03:08 PM:
3:03:08 PM: $ hugo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL
3:03:12 PM: Building sites …
3:03:12 PM: | EN
3:03:12 PM: -------------------+------
3:03:12 PM: Pages | 712
3:03:12 PM: Paginator pages | 0
3:03:12 PM: Non-page files | 0
3:03:12 PM: Static files | 988
3:03:12 PM: Processed images | 0
3:03:12 PM: Aliases | 0
3:03:12 PM: Sitemaps | 1
3:03:12 PM: Cleaned | 0
3:03:12 PM: Total in 3416 ms
3:03:12 PM:
3:03:12 PM: (build.command completed in 3.5s)
3:03:12 PM:
3:03:12 PM: ────────────────────────────────────────────────────────────────
3:03:12 PM: 2. onPostBuild command from netlify-plugin-checklinks
3:03:12 PM: ────────────────────────────────────────────────────────────────
3:03:12 PM:
3:03:12 PM:
3:03:12 PM: ────────────────────────────────────────────────────────────────
3:03:12 PM: Plugin "netlify-plugin-checklinks" internal error
3:03:12 PM: ────────────────────────────────────────────────────────────────
3:03:12 PM:
3:03:12 PM: Error message
3:03:12 PM: UnhandledRejection: a promise was rejected but not handled: TypeError: Cannot read property 'startsWith' of null
3:03:12 PM:
3:03:12 PM: Plugin details
3:03:12 PM: Package: netlify-plugin-checklinks
3:03:12 PM: Version: 4.1.1
3:03:12 PM: Repository: git://github.com/munter/netlify-plugin-checklinks.git
3:03:12 PM: npm link: https://www.npmjs.com/package/netlify-plugin-checklinks
3:03:12 PM: Report issues: https://github.com/munter/netlify-plugin-checklinks/issues
3:03:12 PM:
3:03:12 PM: Error location
3:03:12 PM: In "onPostBuild" event in "netlify-plugin-checklinks" from netlify.toml
3:03:12 PM: at HtmlAnchor.get canonical [as canonical] (/opt/build/repo/.netlify/plugins/node_modules/assetgraph/lib/relations/Relation.js:278:24)
3:03:12 PM: at HtmlAnchor.get crossorigin [as crossorigin] (/opt/build/repo/.netlify/plugins/node_modules/assetgraph/lib/relations/Relation.js:215:14)
3:03:12 PM: at processAsset (/opt/build/repo/.netlify/plugins/node_modules/hyperlink/lib/index.js:647:25)
3:03:12 PM:
3:03:12 PM: Resolved config
3:03:12 PM: build:
3:03:12 PM: command: hugo --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL
3:03:12 PM: commandOrigin: config
3:03:12 PM: environment:
3:03:12 PM: - REVIEW_ID
3:03:12 PM: - HUGO_VERSION
3:03:12 PM: publish: /opt/build/repo/public
3:03:12 PM: headers:
3:03:12 PM: - for: /* values: cache-control: 'public, max-age=600, must-revalidate' referrer-policy: strict-origin-when-cross-origin x-frame-options: DENY plugins: - inputs: {} origin: config package: netlify-plugin-checklinksCaching artifacts
3:03:12 PM: Started saving build plugins
3:03:12 PM: Finished saving build plugins
3:03:12 PM: Started saving pip cache
3:03:12 PM: Finished saving pip cache
3:03:12 PM: Started saving emacs cask dependencies
3:03:12 PM: Finished saving emacs cask dependencies
3:03:12 PM: Started saving maven dependencies
3:03:12 PM: Finished saving maven dependencies
3:03:12 PM: Started saving boot dependencies
3:03:12 PM: Finished saving boot dependencies
3:03:12 PM: Started saving rust rustup cache
3:03:13 PM: Finished saving rust rustup cache
3:03:13 PM: Started saving rust cargo bin cache
3:03:13 PM: Finished saving rust cargo bin cache
3:03:13 PM: Started saving go dependencies
3:03:13 PM: Finished saving go dependencies
3:03:13 PM: Build failed due to a plugin error: Build script returned non-zero exit code: 3
3:03:13 PM: Failing build: Failed to build site
3:03:13 PM: Failed during stage 'building site': Build script returned non-zero exit code: 3
3:03:13 PM: Finished processing build request in 30.109795901s
The following error happened in a specific build:
Full build logs:
The git commit that triggered this build is here.
Do you know what happened?