Skip to content

Conversation

@dgalarza
Copy link

The --preset option without a URL would previously fail as the generated URL would not include the template query string param.

Example:

~/Code ➜ pnpm dlx shadcn@latest create --preset radix-nova
✔ What is your project named? … my-app
✔ Which template would you like to use? › Next.js

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

Message:
Failed to fetch from registry (400): https://ui.shadcn.com/init?base=radix&style=nova&baseColor=neutral&theme=neutral&iconLibrary=hugeicons&font=inter&menuAccent=subtle&menuColor=default&radius=default

Suggestion:
There was a client error. Check your request parameters.

This fixes this issue by passing along the template so that a proper URL is generated. In the example above the proper URL is:

https://ui.shadcn.com/init?base=radix&style=nova&baseColor=neutral&theme=neutral&iconLibrary=hugeicons&font=inter&menuAccent=subtle&menuColor=default&radius=default&template=next

The --preset option without a URL would previously fail as the generated
URL would not include the template query string param.

Example:

```
~/Code ➜ pnpm dlx shadcn@latest create --preset radix-nova
✔ What is your project named? … my-app
✔ Which template would you like to use? › Next.js

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

Message:
Failed to fetch from registry (400): https://ui.shadcn.com/init?base=radix&style=nova&baseColor=neutral&theme=neutral&iconLibrary=hugeicons&font=inter&menuAccent=subtle&menuColor=default&radius=default

Suggestion:
There was a client error. Check your request parameters.
```

This fixes this issue by passing along the template so that a proper URL
is generated. In the example above the proper URL is:

https://ui.shadcn.com/init?base=radix&style=nova&baseColor=neutral&theme=neutral&iconLibrary=hugeicons&font=inter&menuAccent=subtle&menuColor=default&radius=default&template=next

Co-authored-by: Erin Galarza <eringalarza@gmail.com>
@vercel
Copy link
Contributor

vercel bot commented Jan 19, 2026

@dgalarza is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@shadcn shadcn added the area: roadmap This looks great. We'll add it to the roadmap, review and merge. label Jan 19, 2026
@shadcn shadcn requested a review from Copilot January 19, 2026 08:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where using the --preset option without a URL would fail with a 400 error because the generated URL was missing the required template query parameter.

Changes:

  • Modified buildInitUrl function to accept a template parameter
  • Updated the call to buildInitUrl to pass the selected template

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: roadmap This looks great. We'll add it to the roadmap, review and merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants