Open mrchoke opened 2 weeks ago
I'm able to reproduce this with the vee-velidate zod integration. https://stackblitz.com/~/github.com/ZTL-UwU/nuxt-3.12.1-setupDevtoolsPlugin-repro
Im facing same error after updating nuxt to 3.12.1 and using :
future: {
compatibilityVersion: 4,
},
The error is:
Uncaught SyntaxError: The requested module '/_nuxt/@fs/C:/Dev/grooveshop-dev/grooveshop-storefront-ui-node-nuxt/node_modules/.pnpm/@vue+devtools-api@6.6.3/node_modules/@vue/devtools-api/lib/cjs/index.js' does not provide an export named 'setupDevtoolsPlugin' (at vee-validate.esm.js:7:10)
Im running pnpm version 9.3.0
After adding "@vue/devtools-api": "6.6.3",
as a dev dependency the error gone
I wonder if we need to add @vue/devtools-api
to vite.optimizeDeps.include
- or perhaps exclude(?). cc: @antfu
After adding
"@vue/devtools-api": "6.6.3",
as a dev dependency the error gone
This works for me in dev, but building is a no-go.
This seems to be an upstream issue. I think the following should resolve it for you:
export default defineNuxtConfig({
vite: {
optimizeDeps: {
exclude: ['vee-validate']
}
},
modules: ['@vee-validate/nuxt'],
})
This may be worth adding to the @vee-validate/nuxt
module, but I'm a little unsure as vee-validate
does not expose a valid ESM build - and does not have export conditions either.
cc: @antfu
Environment
Nuxt project info: 1:06:56 AM (+7)
Build Modules: -
Reproduction
Error: upgrade from Nuxt 3.11.2 to 3.12.1 Work: downgrade to Nuxt 3.11.2
Describe the bug
it show message
Additional context
No response
Logs