Closed nwalters512 closed 4 years ago
Per https://mdxjs.com/advanced/api#compiler, I should be able to access the compiler like this:
const { createCompiler } = require('@mdx-js/mdx')
However, when I try to do that, I get the following error:
TypeError: createCompiler is not a function
When I look at node_modules/@mdx-js/mdx/index.js, I see that createMdxAstCompiler is the only compiler creation function exported.
node_modules/@mdx-js/mdx/index.js
createMdxAstCompiler
@mdx-js/mdx
Run the example on https://mdxjs.com/advanced/api#compiler with the latest version of all dependencies.
{ title: "Hello, MDX" } should be logged to the console.
{ title: "Hello, MDX" }
The program crashes with the following error:
Thanks for opening an issue @nwalters512! Can you bump MDX to 1.5.9 (just cut a new release) and see if that fixes your issue?
That did the trick! Thanks much @johno 🙏
Subject of the issue
Per https://mdxjs.com/advanced/api#compiler, I should be able to access the compiler like this:
However, when I try to do that, I get the following error:
When I look at
node_modules/@mdx-js/mdx/index.js
, I see thatcreateMdxAstCompiler
is the only compiler creation function exported.Your environment
@mdx-js/mdx
^1.5.8Steps to reproduce
Run the example on https://mdxjs.com/advanced/api#compiler with the latest version of all dependencies.
Expected behaviour
{ title: "Hello, MDX" }
should be logged to the console.Actual behaviour
The program crashes with the following error: