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

[BUG] - Dropdown component causes ChunkLoadError in app/layout #4096

Open
dberruezo opened this issue Nov 16, 2024 · 2 comments
Open

[BUG] - Dropdown component causes ChunkLoadError in app/layout #4096

dberruezo opened this issue Nov 16, 2024 · 2 comments

Comments

@dberruezo
Copy link

dberruezo commented Nov 16, 2024

NextUI Version

@nextui-org/[email protected]

Describe the bug

I'm using Next.js v14.2.16 and Node v20, also tried with Node v18. NextUI was installed using the manual installation instructions and installed component packages separatedly instead of @nexui-org/react.

All of the NextUI components are used in client components with its corresponding 'use client'; statement.

Using the recommended setup, using providers and such, I've no problems using the Button, Input and Card components so far. However when declaring and using a Dropdown component then run the development server, the first render will yield a ChunkErrorLoad app/layout error and the deployed app will not function correctly. After reloading the page it will function correctly. This also happens in production, after building and serving the app.

After isolating all other components and libraries used in the app and then adding one by one the culprit seems to be the Dropdown component. When removing the component the application works without issues and the ChunkErrorLoad error dissapears.

The error is the following: ChunkLoadError: Loading chunk app/layout failed.
(timeout: http://localhost:3000/_next/static/chunks/app/layout.js)

UPDATE: Seems to also happening when using Link components.

Your Example Website or App

https://github.com/dberruezo/nextui-dropdown-bug

Steps to Reproduce the Bug or Issue

  1. npx create-next-app@14
    a. Use src/ directory and app router. Do not use turbopack.
  2. Use the https://nextui.org/docs/guide/installation#individual-installation instructions
  3. Use a providers component.
  4. Create a Dropdown, don't forget the 'use client' directive.
  5. npm run dev (remember, no turbopack)
  6. Open a clean browser tab, inspect it, fire up the local URL and watch the console.
  7. Wait for a couple minutes then the NextJS error shows up.

Expected behavior

The app should not have a ChunkLoadError at start.

Screenshots or Videos

No response

Operating System Version

Kubuntu 24.04

Browser

Chrome

Copy link

linear bot commented Nov 16, 2024

@ryo-manba
Copy link
Member

Please provide a minimal reproducible sandbox. This could help us to investigate faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants