We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac9717c commit 893a538Copy full SHA for 893a538
packages/ui-cli/src/cli.js
@@ -19,6 +19,16 @@ export default function cli() {
19
20
const url = new URL(`r/${packageName}.json`, 'https://clerk.com');
21
22
- execSync(`npx -y shadcn@latest add ${url.toString()}`);
+ try {
23
+ execSync(`npx -y shadcn@latest add ${url.toString()}`, { stdio: 'inherit' });
24
+ } catch {
25
+ console.error(`\nError: Failed to add component "${packageName}"`);
26
+ console.error(`Could not fetch component from: ${url.toString()}`);
27
+ console.error('Please ensure:');
28
+ console.error(' - The component name is correct');
29
+ console.error(' - You have internet connectivity');
30
+ console.error(' - The component exists at the specified URL');
31
+ process.exit(1);
32
+ }
33
}
34
0 commit comments