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

fix: document not found issue using dynamic import #175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ulfUnger99
Copy link

@ulfUnger99 ulfUnger99 commented Dec 26, 2024

Description

When I was running the repo for the first time. This is the error that it was showing

ReferenceError: document is not defined

It's related to server-side rendering (SSR) nature of Next.js. Lottie uses the window object, which is not available during SSR. That's why I dynamically imported the package and disabled SSR for this

Checklist before requesting a review

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • The PR title follows the conventions
  • I have run the regression tests

Copy link

vercel bot commented Dec 26, 2024

@ulfUnger99 is attempting to deploy a commit to the Mento Labs Team on Vercel.

A member of the Team first needs to authorize it.

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

Successfully merging this pull request may close these issues.

1 participant