ui icon indicating copy to clipboard operation
ui copied to clipboard

[bug]: shadcn create errors with http 400

Open valerii15298 opened this issue 1 month ago • 5 comments

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

valerii15298 avatar Dec 12 '25 21:12 valerii15298

i wanna work on this

sanwalsulehri avatar Dec 13 '25 05:12 sanwalsulehri

Yup wanted to try the new feature and scaffold a new app gives the same 400 error

Image

AdityaP183 avatar Dec 13 '25 19:12 AdityaP183

I am having the same issue

LuswetiNick avatar Dec 14 '25 21:12 LuswetiNick

@valerii15298 , How did you manage to set font=geist ? Did you manually put the font name into the URL?

kapishdima avatar Dec 15 '25 18:12 kapishdima

@kapishdima no, as I wrote in the issue:

After copying command from https://ui.shadcn.com/create

valerii15298 avatar Dec 15 '25 18:12 valerii15298

@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

kapishdima avatar Dec 16 '25 19:12 kapishdima

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.```

wardboumans avatar Dec 17 '25 12:12 wardboumans

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 avatar Dec 17 '25 20:12 MysticOaky17

@MysticOaky17 , @wardboumans Is the issue still happening on your side? I created projects using only your presets, and everything worked without errors

kapishdima avatar Dec 19 '25 11:12 kapishdima

@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.

wardboumans avatar Dec 19 '25 12:12 wardboumans

Getting the same issue here!

binn avatar Dec 19 '25 23:12 binn