Problems with 4.1.1 and reka-ui?
Has anyone had problems with Nuxt 4.1.1 and reka-ui?
Our build fails when using 4.1.1 and reka-ui.
Works fine in Nuxt 4.1.0. I don't know if it's a Nuxt or reka issue?
4 Replies
Hi @Jox. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Yes—this is a known issue in Nuxt 4.1.1 related to the new composables tree-shaking transform. It triggers build failures when it encounters patterns like onMounted(() => { ... onUnmounted(() => {}) ... }) inside dependencies (e.g., reka-ui), causing “Cannot split a chunk that has already been edited” errors. Downgrading to Nuxt 4.1.0 is the recommended workaround until a patch is released. [Nuxt 4.1.1 error]
Similar errors were reported with Headless UI and user code using nested lifecycle hooks; maintainers acknowledged it’s a bug and plan to fix by suppressing this transform in these cases. [Nuxt 4.1.1 error]
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
<@525765413322227742> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
I think you try to use rolldown.
This is not ok to do. Splitter: https://github.com/unovue/reka-ui/blob/v2/packages/core/src/Splitter/SplitterPanel.vue#L129
GitHub
reka-ui/packages/core/src/Splitter/SplitterPanel.vue at v2 · unovu...
An open-source UI component library for building high-quality, accessible design systems and web apps for Vue. Previously Radix Vue - unovue/reka-ui
the ai actually got it right in this case, a fix was pushed to the repo after 4.1.1 but has not been released yet
i'd hold off until the next patch release
The fix: https://github.com/nuxt/nuxt/commit/f99eac516aa5bb151cc5ca2d57addf5f2152a4ef
The issue: https://github.com/nuxt/nuxt/issues/33151