PaulieScanlon / paulie-dev-2019-comments-repo

The repo that holds all the comments from paulie.dev
0 stars 0 forks source link

posts/2022/08/mdx-2-breaking-changes-and-gatsby-plugin-mdx-v4/ #2

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

posts/2022/08/mdx-2-breaking-changes-and-gatsby-plugin-mdx-v4/

If you're upgrading to v4 of gatsby-plugin-mdx you'll likely run into errors. Both MDX 2 and v4 of the plugin are major releases and…

https://paulie.dev/posts/2022/08/mdx-2-breaking-changes-and-gatsby-plugin-mdx-v4/

tusharf5 commented 2 years ago

For anyone migrating, since the inbuilt parser doesn't help much with the exact location of the markdown parsing error, it does give you the markdown file name.

You can then paste the content of your markdown file (without the frontmatter) here https://mdxjs.com/playground/ and it will actually give you the exact line/column number which helps immensely in debugging/fixing the issue.

Nattotata commented 2 years ago

Hi! Gatsby also throws this error when there are compatibility issues in plugins.

For example, I'm using remark-grid-tables which is probably not supported for the version of remark (13+) that MDX is using for plugins.

Here's more info on this particular issue: https://github.com/zestedesavoir/zmarkdown/issues/470

Anyway, thanks for the article! I'm currently in the process of migration, so it's really helpful for me.

PaulieScanlon commented 1 year ago

Hey, looking at the repo for remark-grid-tables it looks like it hasn’t been updated for a few years. It also doesn’t list any peerDependancies.

Here’s some tips for working with community plugins. https://www.gatsbyjs.com/blog/gatsby-plugin-not-working-but-why/

sparker888 commented 1 year ago

Hey Paul, Thanks for this! Are you still considering creating a full-migration article?

urre commented 1 year ago

Thanks for this article! Minor typo on eslint npm install. Should be

npm install eslint eslint-plugin-mdx --save-dev