"This error happened while generating the page. Any console logs will be displayed in the terminal window." this is what nextjs spits when I simply do " import { MathComponent } from 'mathjax-react' ". It also lists me a lots of errors I can give you but I defenitly can't find a solution to this. If you need more info just ask me.
Thanks