markdown-link-check
markdown-link-check copied to clipboard
Error: invalid argument type (Array instead of Buffer or Uint8Array)
I tried to check an online markdown file with lots of link (it's an awesome list):
markdown-link-check -p -v https://github.com/awesome-selfhosted/awesome-selfhosted/blob/master/README.md
and it gave an error relative to invalid argument type:
FILE: https://github.com/awesome-selfhosted/awesome-selfhosted/blob/master/README.md
Checking... [== ] 6%node:internal/streams/writable:313
throw new ERR_INVALID_ARG_TYPE(
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Array
at new NodeError (node:internal/errors:377:5)
at _write (node:internal/streams/writable:313:13)
at Writable.write (node:internal/streams/writable:335:10)
at PassThrough.ondata (node:internal/streams/readable:766:22)
at PassThrough.emit (node:events:527:28)
at Readable.read (node:internal/streams/readable:539:10)
at PassThrough.<anonymous> (/usr/lib/node_modules/markdown-link-check/node_modules/needle/lib/needle.js:766:32)
at PassThrough.emit (node:events:527:28)
at emitReadable_ (node:internal/streams/readable:590:12)
at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
code: 'ERR_INVALID_ARG_TYPE'
}
Node.js v18.2.0
Might be duplicated with #192
@PeterDaveHello hello, do you have any update on this, this still happen... very appreciated if you can work on this.
I've merged the changes into link-check and updated the dependencies of this module. The latest release should fix the problem. If not, please re-open.