[bug]: shadcn create errors with http 400
Describe the bug
After copying command from https://ui.shadcn.com/create and trying to run it error happens.
Affected component/components
New shadcn create command errors out with http 400
How to reproduce
Go to https://ui.shadcn.com/create Select any configuration, click create project and copy the shell command. In my case it is:
pnpm dlx shadcn@latest create --preset "https://ui.shadcn.com/init?base=radix&style=vega&baseColor=zinc&theme=zinc&iconLibrary=lucide&font=geist&menuAccent=subtle&menuColor=default&radius=default&template=vite" --template vite
When running it the output is:
> pnpm dlx shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=vega&baseColor=zinc&theme=zinc&iconLibrary=lucide&font=geist&menuAccent=subtle&menuColor=default&radius=default&template=vite" --template vite
(node:65540) [DEP0169] DeprecationWarning: `url.parse()` behavior is not standardized and prone to errors that have security implications. Use the WHATWG URL API instead. CVEs are not issued for `url.parse()` vulnerabilities.
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ What is your project named? … shadcn-new-test
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=base&style=vega&baseColor=zinc&theme=zinc&iconLibrary=lucide&font=geist&menuAccent=subtle&menuColor=default&radius=default&template=vite
Suggestion:
There was a client error. Check your request parameters.
Codesandbox/StackBlitz link
No response
Logs
System Info
MacOS, fish shell
Before submitting
- [x] I've made research efforts and searched the documentation
- [x] I've searched for existing issues
i wanna work on this
Yup wanted to try the new feature and scaffold a new app gives the same 400 error
I am having the same issue
@valerii15298 , How did you manage to set font=geist ? Did you manually put the font name into the URL?
@kapishdima no, as I wrote in the issue:
After copying command from https://ui.shadcn.com/create
@shadcn
I reproduced this error locally. The issue is that the user is trying to use font=geist, but they get this error:
{"error":"Invalid enum value. Expected 'geist-sans' | 'inter' | 'noto-sans' | 'nunito-sans' | 'figtree' | 'roboto' | 'raleway' | 'dm-sans' | 'public-sans' | 'outfit' | 'jetbrains-mono', received 'geist'"}
I saw that other contributors have already opened a pull request to add this font back, so I think we’ll be able to close the issue once you merge it into main
https://github.com/shadcn-ui/ui/pull/9070
Why does this have no prio? Creating a new project doesn't work... And im using Inter.
D:\Sourcecode\nextjs-rss> pnpm dlx shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=mira&baseColor=neutral&theme=amber&iconLibrary=lucide&font=inter&menuAccent=subtle&menuColor=default&radius=default&template=next" --template next
√ What is your project named? ... rssreader
√ 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=base
Suggestion:
There was a client error. Check your request parameters.
'style' is not recognized as an internal or external command,
operable program or batch file.
'baseColor' is not recognized as an internal or external command,
operable program or batch file.
'theme' is not recognized as an internal or external command,
operable program or batch file.
'iconLibrary' is not recognized as an internal or external command,
operable program or batch file.
'font' is not recognized as an internal or external command,
operable program or batch file.
'menuAccent' is not recognized as an internal or external command,
operable program or batch file.
'menuColor' is not recognized as an internal or external command,
operable program or batch file.
'radius' is not recognized as an internal or external command,
operable program or batch file.
'template' is not recognized as an internal or external command,
operable program or batch file.```
pnpm dlx shadcn@latest create --preset "https://ui.shadcn.com/init?base=base&style=nova&baseColor=zinc&theme=indigo&iconLibrary=lucide&font=outfit&menuAccent=bold&menuColor=default&radius=large&template=next" --template next √ What is your project named? ... foxcast √ 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=base
Suggestion: There was a client error. Check your request parameters.
"style" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "baseColor" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "theme" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "iconLibrary" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "font" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "menuAccent" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "menuColor" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "radius" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch. "template" non è riconosciuto come comando interno o esterno, un programma eseguibile o un file batch.
@MysticOaky17 , @wardboumans Is the issue still happening on your side? I created projects using only your presets, and everything worked without errors
@MysticOaky17 , @wardboumans Is the issue still happening on your side? I created projects using only your presets, and everything worked without errors
I tested on another machine and indeed it works fine. Guess ill need to update/clean some stuff.
Getting the same issue here!