mdx-js / mdx

Markdown for the component era
https://mdxjs.com
MIT License
17.77k stars 1.14k forks source link

mdx 2.3.0 + remark-gfm 4.0.0 breaks tables #2379

Closed ky1ejs closed 1 year ago

ky1ejs commented 1 year ago

Initial checklist

Affected packages and versions

2.3.0

Link to runnable example

No response

Steps to reproduce

  1. Check out https://github.com/ky1ejs/kylejs-site/pull/86
  2. Run npm run build
  3. See error relating to GFM table

Expected behavior

Build should complete successfully

Actual behavior

TypeError: Cannot read properties of undefined (reading 'inTable')

268693986-e320c477-446a-4a47-9b16-d01825fccfac

Runtime

Node v18

Package manager

npm v9

OS

macOS

Build and bundle tools

Next.js

ky1ejs commented 1 year ago

I wanted to report this since I didn't see an issue tracking this problem on this repo yet.

According to this remark-gfm issue, many packages in the Markdown JS/TS ecosystem are still updating to latest models/packages since a major release recently (circa August 2023).

In the issue linked above, the maintainer mentions that MDX should be making its way to be up to date with the latest changes.

I'd be happy to help out with this, be would be helpful to get an intro to the work with an existing contributor (and, for that matter, a status check of whether y'all are already aware/working on this :) ).

p.s. thanks so much for your work on this project!

wooorm commented 1 year ago

All the packages are done except for MDX (and remark-lint). Wait a day or two for MDX. One feature rest docs. Use the previous remark-gfm for now.

wooorm commented 1 year ago

v3 is out!

muditjuneja commented 9 months ago

I am using these 2 - "@mdx-js/mdx": "^3.0.0", "@mdx-js/react": "^3.0.0"

along with "remark-gfm": "^4.0.0" and this still gives me this error. I am using gatsby with "gatsby-plugin-mdx": "^5.13.1",

But when I downgrade remark-gfm to 3.0.1, it works. What could be causing this as everywhere I am seeing that this has been fixed now.

ChristianMurphy commented 9 months ago

@muditjuneja this is a bug in gatsby-plugin-mdx, Gatsby does not support MDX 3 yet. See https://github.com/gatsbyjs/gatsby/discussions/36406 and https://github.com/gatsbyjs/gatsby/issues/38789

muditjuneja commented 9 months ago

Thank you @ChristianMurphy ++++ for these links. I will read more into this.