not working with nextjs app
daniloab opened this issue · comments
hey @daniloab , sorry I haven't used this library in a long time but I took a brief look at this. It seems theme-ui has gotten quite a few updates, including depending on a version of @mdx-js/react
that seems to break nextjs due to something with esm. I wasn't getting the erorr you got, but after some tinkering I got it to work. Please check out this example here https://codesandbox.io/s/react-modal-nextjs-x5j48f
Try to match the dependency versions of that example in package.json. Hopefully this helps!
(I actually did get the error you got but only within CodeSandbox, and it would go away if I restarted the server. So I'm not sure if that was CodeSandbox messing up with the npm installs, but it never happened to me locally)