Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js with runtime experimental-edge enabled will result in error: [Error: getInitialProps in Document component is not supported with the Edge Runtime.] #140

Open
bobsingor opened this issue Jan 25, 2023 · 1 comment

Comments

@bobsingor
Copy link

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?

@garronej
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants