You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since [email protected], a nuxt v5 project installed in a monorepo that also has vite 7 somewhere else in another package leads to this 500 error on every route:
Error: Missing field moduleType
code: 'PLUGIN_ERROR', pluginCode: 'InvalidArg', plugin: 'builtin:vite-resolve'
runnerError: ... at [email protected]/dist/runtime/internal/vite/dev-worker.mjs:114
this is due to dropping the optional vite peer dependency, which means the dev worker resolves whatever vite is available (without regard for version constraints). see nuxt/cli#1523 (failing job and fix).
I think vite should be declared as an optional peer as nitro imports it directly.
if anyone else hits this, a pnpm packageExtensions entry re-adding the optional peer unblocks it:
Activity
pi0 commentedon Sep 17, 2026
Nuxt integration can pass
nitro({ vite: { path: import.meta.resolve("vite") } })with exactly right Vite version (#4637)