oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
71.7k stars 2.54k forks source link

bunx, bun x and bun create will return always return an error (Windows) #12087

Open voltration opened 5 days ago

voltration commented 5 days ago

What version of Bun is running?

1.1.16+bf7b327f6

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What steps can reproduce the bug?

Any command using bun create, bunx or bun x.

For example: bun create svelte@latest

What is the expected behavior?

To use the commands without an error

What do you see instead?

bun create svelte@latest error: could not determine executable to run for package create-svelte

Additional information

I have no idea what have caused this, it all worked fine before a day or two ago. I've tried upgrading using bun upgrade, i tried uninstalling it and reinstalling bun using the powershell command from the website. I tried using --bun flag aswell but got the same result

voltration commented 5 days ago

Some more testing, i think its more related to a svelte package but it should work on bun as it does using npm

bun create next-app@latest works bun create svelte@5.0.0 works bun create svelte@latest does not work npm create svelte@latest works

dalessandro07 commented 2 days ago

I had the same error with create-next-app.

> could not determine executable to run for package create-next-app

I think there is a bug in the .bun cache folder.

In this path: "C:/Users/{USER}/.bun/install/cache/"

It generates 2 folders with the packages, and if you run the command:

> bunx create-next-app@14.2.4@@@@1

as it is in the folder, it does work.

probe