Replies: 3 comments
-
On further inspection this suggestions that Typescript is not supported with MDX? The line and position for the error shows it to be L11 C35, which is I don't think this is mentioned in the Gatsby docs at all. |
Beta Was this translation helpful? Give feedback.
-
Hey @davwheat i had a look at your test.mdx file. You have a couple of unescaped characters that MDX2 will throw on. The MDX error is usually quite misleading and points to a line in the file that isn't the actual problem. I wrote this post a while ago. Maybe try a test by removing any "special" characters. I've linked to the breaking changes in the MDX docs in the post. https://paulie.dev/posts/2022/08/mdx-2-breaking-changes-and-gatsby-plugin-mdx-v4/ |
Beta Was this translation helpful? Give feedback.
-
Thanks for your suggestion! I hadn't realised this, and have changed my |
Beta Was this translation helpful? Give feedback.
-
Preliminary Checks
Description
When using the MDX plugin and programmatically generating pages, I get an error about invalid AST which renders MDX-generated pages unusable.
Reproduction Link
https://github.com/davwheat/gatsby-issue-reproduction-3
MDX content:
Steps to Reproduce
yarn develop
Expected Result
The pages to be built in SSG successfully.
Actual Result
SSG fails due to "invalid AST".
Environment
Config Flags
Happens with DEV SSR on (in project) and off (in reproduction).
Beta Was this translation helpful? Give feedback.
All reactions