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

Type & Build err in Nextjs 13 #11

Open
abura1han opened this issue May 3, 2023 · 1 comment
Open

Type & Build err in Nextjs 13 #11

abura1han opened this issue May 3, 2023 · 1 comment

Comments

@abura1han
Copy link

Version

"@appnest/masonry-layout": "^2.0.8"
"typescript": "5.0.3"
"next": "13.2.4"

TypeScript error

image

Build Error

image

I am using Next js 13 with typescript. I can't build the project during the error that occurred from this package "@appnest/masonry-layout"

@gal
Copy link

gal commented Jun 5, 2023

@abura1han You've probably already solved it by now, but NextJS 13 uses server components by default, this code needs to be ran on client-side. See NextJS docs on client and server rendering. (basically just have a component that wont be doing anything on the server, and include "use client" at the top of the file.

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

2 participants