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 14 Type error #217

Closed
wottpal opened this issue Nov 29, 2023 · 2 comments
Closed

Nextjs 14 Type error #217

wottpal opened this issue Nov 29, 2023 · 2 comments
Labels
info needed Extra information is needed to address the issue

Comments

@wottpal
Copy link

wottpal commented Nov 29, 2023

That's what I'm getting with Next.js 14: TypeError: Cannot redefine property: create

Also it throws some server/client component related error:
CleanShot 2023-11-29 at 02 58 43@2x

Might be related to vercel/next.js#54655

@catdad
Copy link
Owner

catdad commented Nov 29, 2023

I am not sure this is a problem with my module. While it does have a create method, it does not attempt to redefine it. It is hard to say anything more without having any further information. canvas-confetti does not provide any specific client/server functionality for NextJS, any such functionality would be in your code. Several of the comments in the bug you linked mention experiencing this issue and it was that they did something wrong.

For the second async/await issue: canvas-confetti never uses async/await, nor does this module appear in the stack trace you provided.

In any case, providing a minimal reproduction example would go a long way in getting this type of thing debugged.

@catdad catdad added the info needed Extra information is needed to address the issue label Nov 29, 2023
@wottpal
Copy link
Author

wottpal commented Nov 29, 2023

Hey, thanks for the response and sorry for the noise. You were right, it was unrelated to your package 🙈

Instead, it was some weird Next.js app-dir issue where one client component was incorrectly exported as async...

@wottpal wottpal closed this as completed Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed Extra information is needed to address the issue
Projects
None yet
Development

No branches or pull requests

2 participants