Error using asciidoctor-mathjax from CLI
I have installed Asciidoctor.js version 2.2.0
I created a new project and added the MathJax extension via
yarn add @djencks/asciidoctor-mathjax
I then tried to run
asciidoctor --require @djencks/asciidoctor-mathjax math.adoc
The file math.adoc contains some formulas.
I get the following error:
arpablo@Big-Henni test-mathjax % asciidoctor --require @djencks/asciidoctor-mathjax math.adoc
(node:56049) UnhandledPromiseRejectionWarning: TypeError: registry.treeProcessor is not a function
at Object.module.exports.register (/Users/arpablo/git/test-mathjax/node_modules/@djencks/asciidoctor-mathjax/lib/asciidoctor-mathjax.js:21:12)
at /Users/arpablo/.config/yarn/global/node_modules/@asciidoctor/cli/lib/invoker.js:134:15
at Array.forEach (<anonymous>)
at Function.prepareProcessor (/Users/arpablo/.config/yarn/global/node_modules/@asciidoctor/cli/lib/invoker.js:127:20)
at Invoker.invoke (/Users/arpablo/.config/yarn/global/node_modules/@asciidoctor/cli/lib/invoker.js:22:13)
at Object.<anonymous> (/Users/arpablo/.config/yarn/global/node_modules/asciidoctor/bin/asciidoctor:9:22)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:56049) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:56049) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I am using a Mac with the latest OS and Node Version v14.0.0
arpablo@Big-Henni test-mathjax % node --version
v14.0.0
Any idea?