From 063ece498ed720b2f27b2b2de5792b640130859b Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 8 Jun 2026 22:33:03 +0200 Subject: [PATCH] chore(shadcn): fix tsconfig + components.json for current CLI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shadcn-vue CLI (verified against https://www.shadcn-vue.com/docs/installation/vite) requires path aliases declared with both baseUrl and paths in tsconfig.json AND tsconfig.app.json. Without baseUrl the CLI's resolvedPaths validator fails with: Validation failed: - resolvedPaths: Required,Required,Required,Required,Required (one Required per declared alias under "aliases" in components.json). Also drop two stale keys from components.json that newer shadcn-vue schema versions reject: - "framework": "vite" → no longer part of the schema - "tailwind.config": "" → empty string fails validation; field is optional for Tailwind 4 (no JS config file) After this commit, "pnpm dlx shadcn-vue@latest add " succeeds out of the box. Co-Authored-By: Claude Opus 4.7 (1M context) --- components.json | 2 -- tsconfig.app.json | 1 + tsconfig.json | 8 +++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components.json b/components.json index 906c7a1..9307fca 100644 --- a/components.json +++ b/components.json @@ -3,13 +3,11 @@ "style": "default", "typescript": true, "tailwind": { - "config": "", "css": "src/style.css", "baseColor": "neutral", "cssVariables": true, "prefix": "" }, - "framework": "vite", "aliases": { "components": "@/components", "composables": "@/composables", diff --git a/tsconfig.app.json b/tsconfig.app.json index 9328499..6e90efc 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -4,6 +4,7 @@ "exclude": ["src/**/__tests__/*"], "compilerOptions": { "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "baseUrl": ".", "paths": { "@/*": ["./src/*"] } diff --git a/tsconfig.json b/tsconfig.json index 1aaa791..d3bc091 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,4 +1,10 @@ { "files": [], - "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" }] + "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.app.json" }], + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"] + } + } }