ui: [bug]: request to https://ui.shadcn.com/r/styles/index.json failed
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
- I’ve made research efforts and searched the documentation
- I’ve searched for existing issues
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 12
- Comments: 38
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
Now you can exec =
npx shadn@latest initایرانی های عزیز از DNS های تحریم شکن مثل https://begzar.ir/ https://shecan.ir/ استفاده کنید اگر جواب نگرفتین از کانفیگ هایی استفاده کنید که دی ان اس cloudflare نداشته باشه اگر از v2ray استفاده میکنید حتما enable tunnel باشه برای خودم وی پی ان کانادا و DNS بگذر توی شرایط جنگی و قطعی نت جواب داد
I was able to resolve the issue by turning on the VPN and changing the location to the US
Issue solved! Here’s a step-by-step solution that worked for me:
Environment Requirements:
Key Steps:
Proxy Tool Settings (if using Clash):
The key was to simplify the environment configuration and use the
--location=globalflag with npx. This resolved both the ETIMEDOUT and TLS connection issues.Hope this helps others facing similar issues! 🚀
I solve it.
Then try to run npx shadcn@latest init
I resolved this by turning off my VPN. Maybe the IP I was using was blocked?
I had the same problem, but I switched my computer network to a phone hotspot and the installation went fine
I have a new idea: use
pnpxinstead ofnpxto speed up installation and get rid of Internet errors.感谢。It works!
shit ,after my attempts, I hava found an avniable host address so far .please configure you hosts file to add this mapping
76.76.21.241 cname.vercel-dns.com. before the configuration please ping it to ensure the network is normal,in the configuration . if you find other host addresses .please share itI tried several method but failed:
However, when I upgrade the Node.js installation on Windows, the problem didn’t exist any more.
So there are my problems and the solutions:
Maybe it’s something with Vercel DNS.