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.
NextUI Version
@nextui-org/dropdown@2.1.31
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
Expected behavior
The app should not have a ChunkLoadError at start.
Screenshots or Videos
No response
Operating System Version
Kubuntu 24.04
Browser
Chrome