#1905·shadcn-vue

[Bug]: Nuxt 4 dev server crashes when using shadcn-nuxt components with imported TypeScript types

Author: kiarash-objCreated Jul 29, 2026Updated Aug 12, 2026

Environment

  • OS: Windows 11
  • Nuxt: 4.5.1
  • Vue: 3.5.40
  • shadcn-nuxt: 2.8.0
  • reka-ui: 2.10.1
  • Vite: 8.1.5
  • TypeScript: 7.0.2
  • Node: 24.18.0
  • Package manager: npm

Description

After adding shadcn-nuxt components, the project builds successfully, but the Nuxt dev server crashes when loading the application.

The error happens in components that use imported TypeScript types inside defineProps or interface extension.

Affected components:

  • components/ui/label/Label.vue
  • components/ui/button/Button.vue
  • components/ui/separator/Separator.vue

Steps to reproduce

  1. Create a Nuxt 4 project.
  2. Install shadcn-nuxt.
  3. Add components such as label, button, or separator.
  4. Run:
bash
npm run dev
  1. Open the application in the browser.

Expected behavior

The Nuxt dev server should start normally and shadcn components should compile successfully.

Actual behavior

The dev server crashes with Vue compiler errors:

No fs option provided to compileScript in non-Node environment.
File system access is required for resolving imported types.

Example:

xml
const props = defineProps<LabelProps & { class?: HTMLAttributes["class"] }>()

Stack trace:

at importSourceToScope
at resolveTypeFromImport
at resolveTypeReference
at innerResolveTypeElements

Another related error:

[@vue/compiler-sfc] Failed to resolve extends base type.

Example:

typescript
interface Props extends PrimitiveProps {

Additional information

The project builds successfully, but fails during development server startup.

The issue appears only when components containing imported TypeScript types from shadcn/reka-ui are compiled.

I also noticed that some package install scripts were blocked during installation:

[email protected] (postinstall: node install.js)
[email protected] (postinstall: node install.js)
[email protected] (postinstall: ...)

I am not sure if this is related, but mentioning it for completeness.

Workaround attempts

  • Reinstalled dependencies
  • Regenerated Nuxt files with:
bash
npx nuxi prepare
  • Removed .nuxt cache
  • Verified Vue and @vue/compiler-sfc versions are matching:

Question

Is this a known compatibility issue between [email protected], [email protected], [email protected], and the current Vue compiler?

Is there a recommended version combination or configuration change to resolve this?