-
Notifications
You must be signed in to change notification settings - Fork 493
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
ReferenceError: document is not defined #296
Comments
For users using nextjs, you can use next/dynamic for this case |
any solution for React SSR case? |
@jeemok I can't remember how this was resolved exactly but somehow we were able to make |
I got this error and I don't know why..... so I'm going to give up on this one sadly. |
OK, here is a solution for React SSR issue:
|
i fllow your solutin, but now issue : |
i resolve it by meself, the issuse because of the differenet of bundle tools how to handle of dynamic import esm,thanks for your solution |
Another solution is to use lazy react function.
|
if you want a json view in a modal..
|
@iamwjun i try this and now it doesn't show on the screen the jsonView |
If someone faces this issue with Nextjs App router "use client",
|
Should use |
I spent hours today chasing down an issue with our jest-puppeteer tests and the culprit was this plugin. It seems as though babel can't figure out what
document
is. I'm not sure where this is in your source or I'd do a PR. Ifdocument
is referring to the window's document as I suspect then you may be able to leveragewindow.document
to save other developers from this issue.The text was updated successfully, but these errors were encountered: