Mathpix / mathpix-markdown-it

Markdown rendering + Latex extras (equations, tables, ...), with conversion features, for the scientific community
MIT License
539 stars 45 forks source link

MathpixLoader Error #315

Open GolliAch opened 8 months ago

GolliAch commented 8 months ago
import { MathpixLoader, MathpixMarkdown } from 'mathpix-markdown-it';

export default function A() {
  return (
    <div>
      <MathpixLoader>
        <MathpixMarkdown text="$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$" />
      </MathpixLoader>
    </div>
  );
}

On our NextJs the MathpixLoader gets stuck on "Loading" 80% of the time. and on the console we see this error:

Error load MathJax => Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

GolliAch commented 8 months ago

For more context:

"mathpix-markdown-it": "^1.3.3",
"next": "14.1.4",
"react": "^18.2.0"

And the error only happens after next build && next start -p 80 and doesn't happen on next dev