bunx shadcn@latest init

I prompted v0.dev to create a starter template and I copied the command and changed the npx to bunx --bun and ran it only to find this error
error: Cannot find module '@jridgewell/gen-mapping' from '/private/tmp/bunx-501-shadcn@latest/node_modules/@babel/generator/lib/source-map.js'
error: Cannot find module '@jridgewell/gen-mapping' from '/private/tmp/bunx-501-shadcn@latest/node_modules/@babel/generator/lib/source-map.js'
I only just installed bun so maybe I didn't configure something write. bunx works for other things like bunx --bun prettier foo.js so I'm sure the problem is a shadcn@latest one. Any help would be appreciated thank you.
Solution:
simply run bun pm cache rm and rerun the code to fix everything
Jump to solution
3 Replies
itslekan
itslekanOP2w ago
I made an issue on shadcn-ui/ui : https://github.com/shadcn-ui/ui/issues/6026
GitHub
[bug]: error: Cannot find module '@jridgewell/gen-mapping' from '/p...
Describe the bug I prompted v0.dev to create a starter template and I copied the command and changed the npx to bunx --bun and ran it only to find this error error: Cannot find module '@jridgew...
itslekan
itslekanOP2w ago
it's been resolved now and tldr: There was bug with the latest version of the @jridgewewll/gen-mapping package but it's been resolved now
Solution
itslekan
itslekan2w ago
simply run bun pm cache rm and rerun the code to fix everything
Want results from more Discord servers?
Add your server