Skip to content

Commit 5a13def

Browse files
KMJ-007shadcn
andauthored
fix: updated error msg for jsconfig in cli (#1696)
* fix: updated error msg for jsconfig in cli * chore: add changeset * style(cli): format --------- Co-authored-by: shadcn <m@shadcn.com>
1 parent b8810ca commit 5a13def

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/smart-pants-smile.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"shadcn-ui": patch
3+
---
4+
5+
use jsconfig for non-ts projects

packages/cli/src/utils/get-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export async function resolveConfigPaths(cwd: string, config: RawConfig) {
6565

6666
if (tsConfig.resultType === "failed") {
6767
throw new Error(
68-
`Failed to load tsconfig.json. ${tsConfig.message ?? ""}`.trim()
68+
`Failed to load ${config.tsx ? "tsconfig" : "jsconfig"}.json. ${
69+
tsConfig.message ?? ""
70+
}`.trim()
6971
)
7072
}
7173

0 commit comments

Comments
 (0)