-
Notifications
You must be signed in to change notification settings - Fork 936
Closed
Labels
Description
Environment
- Operating System: Linux
- Node Version: v22.14.0
- Nuxt Version: 3.17.3
- CLI Version: 3.25.1
- Nitro Version: 2.11.12
- Package Manager: [email protected]
- Builder: -
- User Config: app, build, colorMode, compatibilityDate, debug, devtools, fonts, future, hooks, i18n, icon, imports, modules, nitro, routeRules, runtimeConfig, security, ssr, sourcemap, css, telemetry, vite
- Runtime Modules: @nuxt/[email protected], @pinia/[email protected], @vueuse/[email protected], @nuxtjs/[email protected], [email protected], @nuxt/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3.1.2
Reproduction
https://codesandbox.io/p/devbox/sharp-christian-kzdxt9?file=%2Fapp%2Fpages%2Findex.vue
Description
Starting from v3.1.2, using the built-in v-model-modifiers produces type errors. They are still working tho, so its only a type issue.
Reproduction:
- Open provided link
- Run
pnpx nuxi typecheck
Additional context
No response
Logs
➜ workspace git:(master) ✗ pnpx nuxi typecheck
Packages: +1
+
Progress: resolved 1, reused 1, downloaded 0, added 1, done
ℹ Nuxt Icon server bundle mode is set to local 11:09:23 AM
✔ Nuxt Icon discovered local-installed 2 collections: lucide, simple-icons 11:09:25 AM
ℹ Running with compatibility version 4 nuxt 11:09:25 AM
app/pages/index.vue:8:22 - error TS2353: Object literal may only specify known properties, and 'modelModifiers' does not exist in type '{ readonly onBlur?: ((event: FocusEvent) => any) | undefined; readonly onChange?: ((event: Event) => any) | undefined; readonly "onUpdate:modelValue"?: ((payload: number) => any) | undefined; ... 24 more ...; modelValue?: number | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps'.
8 <UInput v-model.number="myNumber" type="number" />
~~~~~~~
app/pages/index.vue:9:22 - error TS2353: Object literal may only specify known properties, and 'modelModifiers' does not exist in type '{ readonly onBlur?: ((event: FocusEvent) => any) | undefined; readonly onChange?: ((event: Event) => any) | undefined; readonly "onUpdate:modelValue"?: ((payload: string) => any) | undefined; ... 24 more ...; modelValue?: string | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps'.
9 <UInput v-model.lazy="myText" />
~~~~~
Found 2 errors in the same file, starting at: app/pages/index.vue:8
ERROR Process exited with non-zero status (2) 11:09:41 AM
at R._waitForOutput (/root/.cache/pnpm/v3/tmp/dlx-4483/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/main.mjs:508:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.run (/root/.cache/pnpm/v3/tmp/dlx-4483/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/typecheck.mjs:91:9)
at async runCommand$1 (/root/.cache/pnpm/v3/tmp/dlx-4483/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.BlFGnQYG.mjs:1767:16)
at async runCommand$1 (/root/.cache/pnpm/v3/tmp/dlx-4483/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.BlFGnQYG.mjs:1758:11)
at async runMain$1 (/root/.cache/pnpm/v3/tmp/dlx-4483/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/shared/nuxi.BlFGnQYG.mjs:1896:7)
ERROR Process exited with non-zero status (2)incutonezniklaskdk