N
Nuxt2mo ago
flav

weird error

Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@fs/home/debian/dev/bot/apps/web/node_modules/.cache/vite/client/deps/@vueuse_core.js?v=0ae39879' does not provide an export named 'toValue' (at useFormControl.js?v=0ae39879:2:10)
2 Replies
kapa.ai
kapa.ai2mo ago
Hi @flav. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- This error is related to Vite's dependency pre-bundling and module resolution in your Nuxt project. Based on the knowledge sources, this appears to be a caching or module resolution issue with VueUse. Solution Try the following steps to resolve this issue: 1. Clear Vite's cache and rebuild dependencies:
rm -rf node_modules/.cache
rm -rf .nuxt
npm install

rm -rf node_modules/.cache
rm -rf .nuxt
npm install

2. If the issue persists, you may need to configure Vite's dependency optimization. Add this to your nuxt.config.ts:
export default defineNuxtConfig({
vite: {
optimizeDeps: {
include: ['@vueuse/core']
}
}
})

export default defineNuxtConfig({
vite: {
optimizeDeps: {
include: ['@vueuse/core']
}
}
})

Why This Happens According to a similar issue with @vueuse/shared, this type of error can occur intermittently due to Vite's dependency caching mechanism. The error indicates that Vite's pre-bundled version of @vueuse/core is missing the toValue export that your code is trying to import. The issue is typically resolved by clearing the cache, as the pre-bundled dependencies in node_modules/.cache/vite/client/deps/ can become stale or corrupted. As noted in the GitHub issue, a Nuxt team member indicated this is "unlikely to be a Nuxt issue" and is more related to the underlying library or Vite's caching behavior. If the problem continues to occur after clearing the cache, you may want to report it to the VueUse repository as suggested in the similar issue. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai2mo ago
<@360783331962650624> Kapa.ai is still learning and improving, please let me know how I did by reacting below.

Did you find this page helpful?