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

NextJs server components error. #86

Open
DemaPy opened this issue Dec 24, 2023 · 3 comments
Open

NextJs server components error. #86

DemaPy opened this issue Dec 24, 2023 · 3 comments

Comments

@DemaPy
Copy link

DemaPy commented Dec 24, 2023

Hi, i have faced into problem with prerendering "client" components in NextJs.
Event after adding use client directive, i still have error insode server console like: document is not defined.

image

Used: npx create-next-app@latest with typescript and server components.

image

Problem lies in lottie.js file.

@cliid
Copy link

cliid commented Dec 29, 2023

I can confirm this error.
Screen Shot 2023-12-29 at 1 43 38 AM

@DamienDeloubes
Copy link

I can confirm this aswel, I am using NextJS 14.0.4:
image

@Abdul-Asa
Copy link

This fixed it for me.

import dynamic from "next/dynamic";

const UseAnimation = dynamic(() => import("react-useanimations"), {
  loading: () => <div>Loading...</div>,
  ssr: false,
});

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

No branches or pull requests

4 participants