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: Cannot destructure property 'operator' of 'fail.diag' as it is undefined. #555

Open
anthony-telljohann opened this issue May 31, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@anthony-telljohann
Copy link

TypeError: Cannot destructure property 'operator' of 'fail.diag' as it is undefined.

is being thrown. Not sure what I can do about this.

@ayush-sharma
Copy link

Same here. My config is:

package = "netlify-plugin-checklinks"

  [plugins.inputs]
  skipPatterns = ["_site/elbisualp/script.js", "_site/elbisualp/host-embed.js"]
  checkExternal = false

Logs:

Error message
9:33:14 PM:   TypeError: Cannot destructure property 'operator' of 'fail.diag' as it is undefined.
9:33:14 PM: ​
9:33:14 PM:   Plugin details
9:33:14 PM:   Package:        netlify-plugin-checklinks
9:33:14 PM:   Version:        4.1.1
9:33:14 PM:   Repository:     git://github.com/munter/netlify-plugin-checklinks.git
9:33:14 PM:   npm link:       https://www.npmjs.com/package/netlify-plugin-checklinks
9:33:14 PM:   Report issues:  https://github.com/munter/netlify-plugin-checklinks/issues
9:33:14 PM: ​
9:33:14 PM:   Error location
9:33:14 PM:   In "onPostBuild" event in "netlify-plugin-checklinks" from netlify.toml
9:33:14 PM:       at /opt/build/repo/.netlify/plugins/node_modules/tap-spot/index.js:88:17
9:33:14 PM:       at Array.forEach (<anonymous>)
9:33:14 PM:       at Parser.<anonymous> (/opt/build/repo/.netlify/plugins/node_modules/tap-spot/index.js:87:13)
9:33:14 PM:       at Parser.emit (events.js:314:20)
9:33:14 PM:       at Parser.EventEmitter.emit (domain.js:483:12)
9:33:14 PM:       at Parser.emit (/opt/build/repo/.netlify/plugins/node_modules/minipass/index.js:414:25)
9:33:14 PM:       at Parser.emitComplete (/opt/build/repo/.netlify/plugins/node_modules/tap-parser/index.js:442:12)
9:33:14 PM:       at Parser.end (/opt/build/repo/.netlify/plugins/node_modules/tap-parser/index.js:413:10)
9:33:14 PM:       at Stream.method [as end] (/opt/build/repo/.netlify/plugins/node_modules/duplexer/index.js:47:39)
9:33:14 PM:       at Stream.onend (internal/streams/legacy.js:46:10)
9:33:14 PM:       at Stream.emit (events.js:326:22)
9:33:14 PM:       at Stream.EventEmitter.emit (domain.js:483:12)
9:33:14 PM:       at drain (/opt/build/repo/.netlify/plugins/node_modules/through/index.js:34:23)
9:33:14 PM:       at Stream.stream.queue.stream.push [as queue] (/opt/build/repo/.netlify/plugins/node_modules/through/index.js:45:5)
9:33:14 PM:       at Stream.end (/opt/build/repo/.netlify/plugins/node_modules/through/index.js:15:35)
9:33:14 PM:       at _end (/opt/build/repo/.netlify/plugins/node_modules/through/index.js:65:9)
9:33:14 PM:       at Stream.stream.end (/opt/build/repo/.netlify/plugins/node_modules/through/index.js:74:5)
9:33:14 PM:       at Stream.close (/opt/build/repo/.netlify/plugins/node_modules/@munter/tap-render/index.js:84:16)
9:33:14 PM:       at onPostBuild (/opt/build/repo/.netlify/plugins/node_modules/netlify-plugin-checklinks/lib/index.js:60:23)
9:33:14 PM:       at runNextTicks (internal/process/task_queues.js:62:5)
9:33:14 PM:       at processImmediate (internal/timers.js:434:9)
9:33:14 PM:       at async Object.run (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/child

@cybernagl
Copy link

I have the same problem. As this has been an open issue for nearly a year: did either of you find a workaround?

@cybernagl
Copy link

This appears to be a duplicate of issue 73

@Munter
Copy link
Owner

Munter commented Mar 22, 2022

This must be a problem with either the TAP output or the handling of it in tap-spot. Both packages are under my control, so it certainly sounds like a bug on my end.

Could you try to set the plugin config to pretty = false? This should stop sending the TAP output through tap-spot.

I'd like to see the raw TAP output, which should make it possible to see or recreate the error with the tap-spot package

[[plugins]]
package = "netlify-plugin-checklinks"

  [plugins.inputs]
  # Checklinks outputs TAP (https://testanything.org/tap-version-13-specification.html)
  # by default. Enabling pretty mode makes the output easier on the eyes.
  pretty = true

@lmestel
Copy link

lmestel commented Nov 20, 2023

I had the same error. pretty = false helped me to identify the problem:

not ok 82 load _site/static/img/videos/video-1080.mp4
  ---
    operator: load
    expected:
      "200 _site/static/img/videos/video-1080.mp4"
    actual:
      "ENOENT: no such file or directory, open '/Users/…/11ty/_site/static/img/videos/video-1080.mp4'"
    at: _site/about/index.html:25:26703 <source media="(min-width: 950px)" src="/static/img/videos/video-1080.mp4" type="video/mp4">
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants