With the release of version 2.2.13 of asciidoctor-diagram the following error is occurring for wavedrom diagrams when generating PDFs on Linux:
asciidoctor-pdf -r asciidoctor-diagram ./sample.adoc
asciidoctor: ERROR: sample.adoc: line 10: Failed to generate image: wavedrom-cli failed: internal/fs/utils.js:581
throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type boolean (true)
at readFile (fs.js:317:10)
at go$readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/graceful-fs/graceful-fs.js:118:14)
at Object.readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/graceful-fs/graceful-fs.js:115:12)
at Object.readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/universalify/index.js:5:57)
at Object. (/usr/local/lib/node_modules/wavedrom-cli/wavedrom-cli.js:36:4)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
code: 'ERR_INVALID_ARG_TYPE'
}
This appears to be an issue in Asciidoctor Diagram. Asciidoctor PDF doesn't manage the generation of images in any way. It just reads the files that have already been generated.
With the release of version 2.2.13 of asciidoctor-diagram the following error is occurring for wavedrom diagrams when generating PDFs on Linux:
asciidoctor-pdf -r asciidoctor-diagram ./sample.adoc asciidoctor: ERROR: sample.adoc: line 10: Failed to generate image: wavedrom-cli failed: internal/fs/utils.js:581 throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path); ^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type boolean (true) at readFile (fs.js:317:10) at go$readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/graceful-fs/graceful-fs.js:118:14) at Object.readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/graceful-fs/graceful-fs.js:115:12) at Object.readFile (/usr/local/lib/node_modules/wavedrom-cli/node_modules/universalify/index.js:5:57) at Object. (/usr/local/lib/node_modules/wavedrom-cli/wavedrom-cli.js:36:4) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) { code: 'ERR_INVALID_ARG_TYPE' }
Ref AsciiDoctor-Diagram Issue 441.