I usually am building documentation via gradle but today I installed the asciidoctorj CLI for converting one-off documents quickly. However, I'm having trouble rendering a mermaid diagram. I'm getting this:
PS C:\> asciidoctorj.bat -r asciidoctor-diagram .\mag-workitem.adoc
uri:classloader:/gems/asciidoctor-diagram-2.1.0/lib/asciidoctor-diagram/util/cli_generator.rb:53: warning: Tempfile#unlink or delete called on open file; ignoring
Mar 12, 2021 10:46:46 AM uri:classloader:/gems/asciidoctor-2.0.12/lib/asciidoctor/parser.rb build_block
SEVERE: mag-workitem.adoc: line 23: Failed to generate image: mmdc.cmd failed: C:\Users\MyPowerShell\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:80
throw new Error(missingText);
Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (848005).
at ChromeLauncher.launch (C:\Users\MyPowerShell\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:80:27)
PS C:\> npm install chromium@848005
npm ERR! code ETARGET
npm ERR! notarget No matching version found for chromium@848005.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Roaming\npm-cache\_logs\2021-03-12T18_49_25_644Z-debug.log
I do have a version of chromium installed, though apparently it's not at the requested version:
PS C:\> npm list chromium
Any suggestions on either getting this CLI to work or another CLI option with which I can process mermaid diagrams?