mathpix-markdown-it
mathpix-markdown-it copied to clipboard
MathpixLoader Error
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'.
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