shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
73.44k stars 4.51k forks source link

[bug]: request to https://ui.shadcn.com/r/styles/index.json failed #4712

Open luco opened 2 months ago

luco commented 2 months ago

Describe the bug

While trying to exec shadn@latest init, the index.json is timing out:

npx shadcn@latest init
✔ Preflight checks.
✔ Verifying framework. Found Next.js.
✔ Validating Tailwind CSS.
✔ Validating import alias.

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

request to https://ui.shadcn.com/r/styles/index.json failed, reason: connect ETIMEDOUT 76.76.21.164:443

I'm able to acccess the json via web browser:

  {
    "name": "new-york",
    "label": "New York"
  },
  {
    "name": "default",
    "label": "Default"
  }
]

Affected component/components

core

How to reproduce

npx shadcn@latest init

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

macOS Sonoma

Before submitting

luco commented 2 months ago

Maybe it's something with Vercel DNS.

ping ui.shadcn.com
PING cname.vercel-dns.com (76.76.21.164): 56 data bytes
Request timeout for icmp_seq 0
luco commented 2 months ago

Now pinging correctly:

ping ui.shadcn.com
PING cname.vercel-dns.com (76.76.21.61): 56 data bytes
64 bytes from 76.76.21.61: icmp_seq=0 ttl=243 time=11.711 ms
64 bytes from 76.76.21.61: icmp_seq=1 ttl=243 time=14.729 ms
64 bytes from 76.76.21.61: icmp_seq=2 ttl=243 time=11.605 ms
guojian0911 commented 1 month ago

@luco 怎么解决的呢?

amjido-01 commented 4 weeks ago

please how can i go around this issue, because i have been trying to install nextjs with shadcn but i keep getting this error.

luco commented 4 weeks ago

It's something with Vercel DNS I think.

luco commented 3 weeks ago

It's back lol. Same timeout:

PING 76.76.21.164 (76.76.21.164): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
Request timeout for icmp_seq 8
Request timeout for icmp_seq 9
Request timeout for icmp_seq 10
franckDev21 commented 3 weeks ago

I have the same problem

➜  front git:(main) ✗ npx shadcn@latest add form   
⠧ Checking registry.

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

request to https://ui.shadcn.com/r/index.json failed, reason: 
sgarchavada commented 2 weeks ago

It happen with my company network, they are using proxy for the security reason, when i tried with mobile network in my personal laptop, it worked, but not working in all the PC in my company.

Solution: For those who using proxy, write this in CMD, where your project is open

set http_proxy=http://your.proxy:5050
set https_proxy=http://your.proxy:5050
set http.proxyStrictSSL=false
set NODE_TLS_REJECT_UNAUTHORIZED=0

Now you can exec = npx shadn@latest init

metclan commented 2 weeks ago

I was able to resolve the issue by turning on the VPN and changing the location to the US

gongsungg commented 1 week ago

I was able to resolve the issue by turning on the VPN and changing the location to the US

This doesn't work for me, is there any other solution?

Forfires commented 5 days ago

I had the same problem, but I switched my computer network to a phone hotspot and the installation went fine