---------------------- Based on the knowledge sources, upgrading VueUse to v14 can indeed break Nuxt 4 production builds. While the exact breaking changes in VueUse v14 are not detailed in the provided sources, there are several strong hints and related issues:
There are recent reports of module errors such as "The requested module 'vue' does not provide an export named 'default'" and similar ESM/CJS interop issues when using Nuxt 4 with certain versions of VueUse and related libraries. These errors often occur in production builds but not in development, and are sometimes resolved by downgrading the problematic package (e.g., VueUse) to an earlier version like v13.9.0, as you observed. This suggests that VueUse v14 introduced changes incompatible with the current Nuxt 4 build process or its dependencies [[Github Issue: vue default export error]](<https://github.com/nuxt/nuxt/issues/33132>).
The Nuxt team and community have acknowledged that such issues are likely due to upstream library changes, not Nuxt itself. They recommend reporting these issues to the library maintainers (in this case, VueUse) and, as a workaround, pinning or downgrading to a compatible version [[Github Issue: vue default export error]](<https://github.com/nuxt/nuxt/issues/33132>), [[Github Issue: @vueuse_shared.js does not provide an export named 'createRef']](<https://github.com/nuxt/nuxt/issues/33426>).
The Nuxt documentation also notes that if you encounter ESM/CJS interop issues, you may need to adjust your Vite config (e.g., `optimizeDeps.include`, `ssr.noExternal`) or transpile/alias problematic libraries, but these are workarounds and may not resolve all breaking changes introduced by a major library update [[Troubleshooting ESM Issues](<https://nuxt.com/docs/4.x/guide/concepts/esm#troubleshooting-esm-issues>)].
There is no official migration or upgrade guide for VueUse v14 in the Nuxt documentation, and the VueUse website only documents up to v12.7, so the safest approach for now is to stick with VueUse v13.9.0 until compatibility is confirmed or a migration guide is published.
If you encounter a specific error message, you can try searching for it in the Nuxt or VueUse issue trackers, as others may have found workarounds for particular cases. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------