tss-react
tss-react copied to clipboard
Next.js with runtime experimental-edge enabled will result in error: [Error: `getInitialProps` in Document component is not supported with the Edge Runtime.]
trafficstars
I wish to use MUI with TSS-react in Next.js with experimental-edge enabled.
This results in the following error:
[Error: getInitialProps in Document component is not supported with the Edge Runtime.]
Is there a workaround for this?
Hi @bobsingor,
Thats a bummer,
I don't thik there is a workaround no, this is something related to @emotion.
If you look at the recommendend MUI setup for Next.js they also uses Document.getInitialProps: https://github.com/mui/material-ui/blob/a722357b47d5572301334bb716c985e770046ced/examples/nextjs-with-typescript/pages/_document.tsx#L67
Are you using MUI?
I suggest you submit a issue on the https://github.com/emotion-js/emotion repo?