-
Notifications
You must be signed in to change notification settings - Fork 582
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
Lottie SSR issue in BentoGrid #32
Comments
Same problem |
Did anyone find a fix? I am experiencing the same issue. |
One possible solution is to downgrade the node to 20.x and reinstall node modules |
The reason this issue is popping up is because of NextJS Server-Side Rendering (SSR) nature, while Lottie utilizes the window object which is not available during SSR, causing the build to fail. To fix the issue, simply change the code in BentoGrid.tsx for the importing of the lottie library:
Credits to: Dragos UniqQum Edit-1: I noticed that using this method will lead to a forEach error, therefore, to resolve that error, try using an alternative library in the name of react-lottie-player which has almost similar options with minor modifications required. Code with modifications:
|
Tried dynamic loading with useEffect Hook
The text was updated successfully, but these errors were encountered: