[bug]: npx shdnc@latest url stuck at "Installing dependencies"
Describe the bug
When I run npx shdnc@latest url, the process gets stuck at the "Installing dependencies" step and does not proceed
Affected component/components
Cannot install any component using the cli
How to reproduce
Run npx shadcn@latest add "https://v0.dev/chat/b/b_wslkIiIMLhs?token=eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..pt0lLMnobX0YxVIb._Fh59fncD8EAU8BlmQgAaC25DK0KqCgq4R86zw28bkXG-Hrg83lQmkIynis.I42dFW87PMfK4Fq5j_Ht5g"
Observe that the process stalls at "Installing dependencies."
Codesandbox/StackBlitz link
No response
Logs
Checking registry.
Installing dependencies
System Info
Ubuntu 24.04
node v22.11.0
bun 1.1.34
Before submitting
- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
I experience this quite a lot too and what works for me is probably unrelated to what you're experiencing but I'm leaving this for someone with my specific problem.
Fix: Use a VPN
Not sure why this is what works for me anytime I'm experiencing this but... I do hope it helps someone.
i actually used bunx instead of npx and it works
bunx doesn't work either for me. notably just bun add @radix-ui/react-switch gets stuck
I am experiencing this in a bun monorepo. After some debugging it appears that @antfu/ni (called from getPackageManager, from getUpdateDependenciesPackageManager, from installWithPackageManager, from updateDependencies which is where the Installing dependencies spinner is run) is detecting yarn instead of bun, because it's not seeing the bun.lock in the cwd (because it's in the root of the repo). touch bun.lock in the working directory was an acceptable workaround, I just delete it when I'm done installing things then re-run bun install to be sure the root bun.lock is as it should be.
Edit: and the reason was actually my fault: I had "packageManager": "yarn" in my root package.json somehow.
- sudo pnpm add -D tw-animate-css
- sudo pnpm dlx shadcn@latest add xxxxxx
it's ok, you can try...