-
-
Notifications
You must be signed in to change notification settings - Fork 70
ReferenceError: document is not defined at createTag... #101
Copy link
Copy link
Open
LifeSG/react-design-system
#647Description
Hello everyone,
I had some issues with ReferenceError (with SSR).
And yes I know, it could be solved by dynamic import, lazy or maybe some other ways.
But the situation is like below:
- There is a main(index) page with Lottie (lottie-react)
- I've even use useEffect with isMount state to render the Lottie after the mount
case1.
- No errors and works fine in Node 18 (v.18.18.0)
case2.
- ReferenceError: document is not defined at createTag... occurs in higher version of Node (20, 21)
So, we (I and my co-worker) decided to fix Node version to 18 and it works fine.
But we are just curious about it.
Try to figure it out but all we can find is that the node version effects build in somehow.
If anyone knows what has been changed between 18 and higher, it would be nice to know of it.
Thank you so much.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels