-
Notifications
You must be signed in to change notification settings - Fork 988
Closed
Labels
bugSomething isn't workingSomething isn't workingp1-highSignificant bug or highly requested featureSignificant bug or highly requested featurev4#4488#4488
Description
Environment
- Operating System: Darwin
- Node Version: v22.14.0
- Nuxt Version: 4.2.1
- CLI Version: 3.30.0
- Nitro Version: 2.12.9
- Package Manager: [email protected]
- Builder: -
- User Config: ssr, srcDir, dir, extends, modules, vue, app, runtimeConfig, experimental, sourcemap, sentry, ignore, devtools, compatibilityDate, future, vite, typescript, eslint
- Runtime Modules: @vueuse/[email protected], @nuxt/test-utils/[email protected], @sentry/nuxt/[email protected], [email protected], @nuxt/[email protected]
- Build Modules: -
Is this bug related to Nuxt or Vue?
Nuxt
Package
v4.x
Version
v4.2.0
Reproduction
<template>
<UButton :label="label || undefined" v-bind="buttonProps" @click="openConfirm()" />
</template>
<script lang="ts" setup>
import type { ButtonProps } from '@nuxt/ui'
import type { Props as ModalConfirmProps } from './ModalConfirm.vue'
import { UiModalConfirm } from '#components'
import { useForwardProps } from 'reka-ui'
export interface Props extends ModalConfirmProps, ButtonProps {}
const props = defineProps<Props>()
const modalForward = useForwardProps(reactivePick(props, 'title', 'message', 'confirmButton', 'onConfirm'))
const buttonProps = useForwardProps(reactiveOmit(props, 'title', 'message', 'confirmButton', 'label', 'onConfirm'))
const modal = useOverlay().create(UiModalConfirm)
function openConfirm() {
// @ts-expect-error type instantiation is excessively deep and possibly infinite.
return modal.open(modalForward.value)
}
</script>Description
An error occurs when building the project:
Nuxt Build Error: [vite:vue] [@vue/compiler-sfc] Failed to resolve extends base type.
I found out when this started happening. It broke after PR #5348
Additional context
No response
Logs
Nuxt Build Error: [vite:vue] [@vue/compiler-sfc] Failed to resolve extends base type. nuxi 3:29:23 PM
If this previously worked in 3.2, you can instruct the compiler to ignore this extend by adding /* @vue-ignore */ before it, for example:
interface Props extends /* @vue-ignore */ Base {}
Note: both in 3.2 or with the ignore, the properties in the base type are treated as fallthrough attrs at runtime.
/Users/*/packages/ui/app/components/ui/ButtonConfirm.vue
9 | import { useForwardProps } from 'reka-ui'
10 |
11 | export interface Props extends ModalConfirmProps, ButtonProps {}
| ^^^^^^^^^^^
12 |
13 | const props = defineProps<Props>()
file: /Users/*/packages/ui/app/components/ui/ButtonConfirm.vue
at ScriptCompileContext.error (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19759:11)
at resolveInterfaceMembers (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:22208:13)
at innerResolveTypeElements (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:21988:14)
at resolveTypeElements (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:21971:20)
at innerResolveTypeElements (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:22042:16)
at resolveTypeElements (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:21971:20)
at resolveRuntimePropsFromType (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:23699:20)
at extractRuntimeProps (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:23675:17)
at genRuntimeProps (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:23663:18)
at Object.compileScript (node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:24677:21)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingp1-highSignificant bug or highly requested featureSignificant bug or highly requested featurev4#4488#4488