-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Getting ReactDOMServer does not yet support Suspense error while using styled-components #22508
Comments
I see this mentioned here without resolution: #16216 |
Also getting this error at the moment |
I have the same bug with:
|
It seems that adding the below settings to
|
Is it suspected to be like that? |
Passing in useSuspense: false even without passing wait: true solved this for me. |
Could someone paste a working example please of the suggested fix as I can't work out how to add this to a Current implementation:
Sourced from react-three-fibre next.js starter |
@jamesryan-dev did you try with:
|
Hey @SalahAdDin I kinda did.. I have the
Had to |
I assumed what with inheriting this config that adding the solution within the i18n section of this pre-cooked config would be correct no?
|
That's how i'm using it: module.exports = {
i18n: {
localeDetection: false,
defaultLocale: "en",
locales: ["en", "es", "tr"],
},
react: {
useSuspense: false,
wait: true,
},
}; |
In which file did you wrote this? I use
but no luck. Anyone using next-translate maybe? |
I'm using |
In my case following error So at the end of the day next-i18next
causes veeeeery vague error |
@adrianbienias You are right. Also, it only occurred when the page is launch directly but not navigate from other pages, and I think this issue has nothing to do with styled-components or But I think this is only one kind of situation this might happen. |
I'm not using any kind of translation package... Is there any fix for a |
I don't think it has anything to do with styled-components, but I do suspect there's something wrong with _document.js. Similarly to @mario-ls, I'm using the _document.js for Material UI and am getting the same error. I am actually trying to use Suspense with Recoil though so I'm not sure why I'm getting this. Does Next.js not support Suspense or something? It would be kind of a bummer given that I'm not even using SSR outside of dev since I'm running Next Export for a fully static site... |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.0.6
What version of Node.js are you using?
14.4.0
What browser are you using?
Firefox
What operating system are you using?
Mac
How are you deploying your application?
Heroku
Describe the Bug
I recently updated next-i18next to 8.0.0 and am also using styled components with a custom _document.js as described in the nextjs examples section (https://github.com/vercel/next.js/tree/master/examples/with-styled-components).
If I load my page index and navigate to another page like /about, everything works fine. If I try to navigate directly to /about, I get the following error:
Error: ReactDOMServer does not yet support Suspense.
Expected Behavior
I would expect to be able to load other pages directly without an error appearing.
To Reproduce
Code snippets below in the comments.
The error I'm getting is:
Error: ReactDOMServer does not yet support Suspense.
Here's an example of _document.js
Here's an example of a page:
The text was updated successfully, but these errors were encountered: