bun
bun copied to clipboard
Can't run shadcn CLI a second time
What version of Bun is running?
1.1.4+fbe2fe0c3
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
the first time I installed bun on my laptop then I installed shadcn/ui for the first time on the nextjs project that I created, everything worked fine, but when I created a new Nextjs project and installed shadcn/ui I got an error
$ bunx shadcn-ui@latest init
error: could not determine executable to run for package shadcn-ui
at first I thought this problem was from the shadcn CLI, but I tried looking for a fix on google and found this issue #4583, I followed this comment to reset the cache on the bun then I tried it and the CLI can work again
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
bunx --bun shadcn-ui@latest init use this and re-try..
same here
$ bunx --bun shadcn-ui@latest add alert-dialog
error: could not determine executable to run for package shadcn-ui
$ bunx --bun shadcn-ui@latest init
error: could not determine executable to run for package shadcn-ui
me too
C:\...>bunx --bun shadcn-ui@latest add dialog
error: could not determine executable to run for package shadcn-ui
so what the best solution?
so what the best solution?
I'm currently using bun for my project, but I use pnpm specifically to install any shadcn UI components until the issue is fixed.
pnpm dlx shadcn-ui@latest add accordion
I'm also facing the same problem. : (
hello @Sisableng ,
you can use this to substitute command:
bun add shadcn-ui@latest
bun shadcn-ui init
bun shadcn-ui add <component>
hello @Sisableng , you can use this to substitute command:
bun add shadcn-ui@latestbun shadcn-ui initbun shadcn-ui add <component>
did it work for you? I think I've tried it before but it was the same, maybe I'll try it again in my next project.
What version of Bun is running?
1.1.4+fbe2fe0c3
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
the first time I installed bun on my laptop then I installed shadcn/ui for the first time on the nextjs project that I created, everything worked fine, but when I created a new Nextjs project and installed shadcn/ui I got an error
$ bunx shadcn-ui@latest init error: could not determine executable to run for package shadcn-uiat first I thought this problem was from the shadcn CLI, but I tried looking for a fix on google and found this issue #4583, I followed this comment to reset the cache on the bun then I tried it and the CLI can work again
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
have you run the command bunx --bun shadcn-ui@latest init initially ?
hello @Sisableng , you can use this to substitute command:
bun add shadcn-ui@latestbun shadcn-ui initbun shadcn-ui add <component>did it work for you? I think I've tried it before but it was the same, maybe I'll try it again in my next project.
Haha, yes. It's work for me. Hope u can find the solution.
Looks like some of the comments doesn't read the initial post. The OP points towards another thread where a solution is presented. Had the same issue and the following that was written worked for me.
You can try again deleting bun's cache: bun pm cache rm (you also have to delete node_modules and bun.lockb again)
@lorenzorapetti
Looks like some of the comments doesn't read the initial post. The OP points towards another thread where a solution is presented. Had the same issue and the following that was written worked for me.
You can try again deleting bun's cache:
bun pm cache rm(you also have to delete node_modules and bun.lockb again) @lorenzorapetti
Thank you very much. This helped me out a lot
These set of commands are working for me:
For initial install and init
bun add shadcn-ui@latest
bun x shadcn-ui init
For adding any components, just use
bun xinstead ofbunx:
bun x --bun shadcn-ui@latest add button
bunx --bun shadcn@latest init instead of bunx shadcn-ui@latest init
don't put the ui in
Thank you @10d3 , that fixed the issue on my side.
guys, its fixed with bunx --bun shadcn@latest init
$ bun x --bun shadcn@latest add dialog error: could not determine executable to run for package shadcn
@AngelBlackBlue
$ bunx not bun x