oven-sh / bun

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

Error: spawn bun ENOENT #12177

Open MrOxMasTer opened 3 weeks ago

MrOxMasTer commented 3 weeks ago

What version of Bun is running?

1.1.17+bb66bba1b

What platform is your computer?

windows

What steps can reproduce the bug?

bun create next-app

What is the expected behavior?

No mistakes

What do you see instead?

bun create next-app
√ What is your project named? ... my-app √ Would you like to use TypeScript? ... No / Yes √ Would you like to use ESLint? ... No / Yes √ Would you like to use Tailwind CSS? ... No / Yes √ Would you like to use src/ directory? ... No / Yes √ Would you like to use App Router? (recommended) ... No / Yes
√ Would you like to customize the default import alias (@/*)? ... No / Yes Creating a new Next.js app in ...

Using bun.

Initializing project with template: app-tw

Installing dependencies:

Installing devDependencies:

node:events:497 throw er; // Unhandled 'error' event ^

Error: spawn bun ENOENT at notFoundError (C:\Users\CD86~1\AppData\Local\Temp\bunx-596791048-create-next-app@latest\node_modules\create-next-app\dist\index.js:8:77149) at verifyENOENT (C:\Users\CD86~1\AppData\Local\Temp\bunx-596791048-create-next-app@latest\node_modules\create-next-app\dist\index.js:8:77528) at t.emit (C:\Users\CD86~1\AppData\Local\Temp\bunx-596791048-create-next-app@latest\node_modules\create-next-app\dist\index.js:8:77383) at ChildProcess._handle.onexit (node:internal/child_process:294:12) Emitted 'error' event on ChildProcess instance at: at t.emit (C:\Users\CD86~1\AppData\Local\Temp\bunx-596791048-create-next-app@latest\node_modules\create-next-app\dist\index.js:8:77424) at ChildProcess._handle.onexit (node:internal/child_process:294:12) { code: 'ENOENT', errno: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'install' ] }

Node.js v20.15.0

Additional information

No response

museadam commented 3 weeks ago

When running bun create next-app on my machine I could not reproduce the bug. You could try uninstalling and reinstalling bun.

MrOxMasTer commented 3 weeks ago

When running bun create next-app on my machine I could not reproduce the bug. You could try uninstalling and reinstalling bun.

I deleted it using this command and installed it using powershell too powershell -c ~\.bun\uninstall.ps1

The result is the same: image

The fact is that it sort of installs, but at the same time this error occurs. The bonus is the strange Appdata folder, which (it seems to me) should not appear here.

MrOxMasTer commented 3 weeks ago

I do not know if the Cyrillic alphabet plays a role with my windows User, but it does. Maybe the information will help