Closed bulhakovolexii closed 10 months ago
stake trace says that error goes from rehype-katex
TypeError: Cannot read properties of undefined (reading 'className')
❯ ../../node_modules/.pnpm/rehype-katex@7.0.0/node_modules/rehype-katex/lib/index.js:48:56
❯ node element<sup> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:346:27
❯ node element<a> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ node element<p> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ node element<li> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ node element<ol> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ node element<section> file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ node root file:/Users/dmytro/Desktop/nextra/node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:363:61
❯ visitParents ../../node_modules/.pnpm/unist-util-visit-parents@6.0.1/node_modules/unist-util-visit-parents/lib/index.js:304:31
❯ ../../node_modules/.pnpm/rehype-katex@7.0.0/node_modules/rehype-katex/lib/index.js:47:5
after more deep dive into this problem, I figured out that updating @mdx-js/mdx
from 2.3.0 to 3.0.0 fixes this issue (Nextra 3 already uses mdx v3)
Use Nextra 3 alpha and refactor $$
style to https://the-guild.dev/blog/nextra-3#-syntax-no-longer-works-for-latex
I tried the alpha version, indeed, it does not contain such a bug. Big thanks!
I found the following problem.
With a clean installation and configuration according to the documentation and the latex module is enabled...
...if i mark a footnote to the same reference more than once, compiling is impossible.
But if there is no more than one footnote, or the latex module is disabled, then everything is fine.
The problem also does not occur if i change the file extension from .mdx to .md.
Please help me fix this problem. :heart: