Skip to content

[Bug]: Error when adding a component in Nuxt 4 using shadcn-vue CLI #1381

@RolandoHidalgo

Description

@RolandoHidalgo

Reproduction

bunx --bun shadcn-vue@latest add [component]

Describe the bug

When using shadcn-vue in a Nuxt 4 project, the CLI fails during component generation with this error:

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

Validation failed:
- resolvedPaths: Required,Required,Required,Required,Required

Current tsconfig.json setup (Nuxt 4 recomended)

{
  "files": [],
  "references": [
    { "path": "./.nuxt/tsconfig.app.json" },
    { "path": "./.nuxt/tsconfig.server.json" },
    { "path": "./.nuxt/tsconfig.shared.json" },
    { "path": "./.nuxt/tsconfig.node.json" }
  ]
}

Previous working setup

{
  "extends": "./.nuxt/tsconfig.json",
}

This setup works correctly with shadcn-vue, and the CLI resolves aliases without issue.
This issue occurs when the project uses a tsconfig.json with "references".

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 5.46 GB / 15.75 GB
  Binaries:
    Node: 23.10.0 - ~\AppData\Local\pnpm\node.EXE
    Yarn: 1.22.22 - ~\AppData\Local\pnpm\yarn.CMD
    npm: 10.9.2 - ~\AppData\Local\pnpm\npm.CMD
    pnpm: 10.0.0 - ~\AppData\Local\pnpm\pnpm.EXE
    bun: 1.2.10 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (139.0.3405.86)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    @vueuse/core: ^13.6.0 => 13.6.0
    nuxt: ^4.0.1 => 4.0.1
    reka-ui: ^2.4.1 => 2.4.1
    shadcn-nuxt: 2.2.0 => 2.2.0
    vue: ^3.5.13 => 3.5.18

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions