oven-sh / bun

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

windows: `bun i .` - Internal Error Crash #13806

Open RiskyMH opened 2 weeks ago

RiskyMH commented 2 weeks ago

How can we reproduce the crash?

  1. go to any folder and run bun i .

(Also note that I coped the error trace into normal crash report as opening weird page with nothing to fill out)

(btw this is very not important, I just thought I should report this as its a crash - but its not like it should work)

Relevant log output

C:\Users\<user>\any-legit-folder> bun i .
bun add v1.1.27 (267afa29)
============================================================
Bun v1.1.27 (267afa29) Windows x64
Windows v.win10_fe
CPU: sse42 avx avx2 avx512
Args: "bun" "i" "."
Elapsed: 19ms | User: 15ms | Sys: 0ms
RSS: 63.45MB | Peak: 63.45MB | Commit: 111.01MB | Faults: 15677

panic(main thread): Internal Error: Do not pass posix paths to Windows APIs, was given '\package.json'. Please open an issue on GitHub with a reproduction.
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

To send a redacted crash report to Bun's team,
please file a GitHub issue using the link below:

 https://bun.report/1.1.27/wi1267afa2AAyhh6Lk/gsN843tV+hklSgn6sM6lxhF0wrhFq/l+Emtk9Ew28+EA0eNoFwTEOwjAMBdCr/K0LygHYkEDQrRsLi9taraGyrdghHJ/3Rk2uSgdutVo942pQSzhFwC3kB6fcA2l4iq7WA5dpjBM6BTb5smJ4OS0f2ri8w3QomA6mYJizghQS0RimuEs+2owuuYNQ2autbUkxLX+1dy/0

ALSO NOTE that wsl/linux gives interesting error too:
user@device:~$ bun i .
bun add v1.1.26 (0a37423b)

installed @

1 package installed [356.00ms]
Removed: 1
Failed to install 1 package
error: FileNotFound installing  (opening node_modules/package dir)

Stack Trace (bun.report)

Bun v1.1.27 (267afa2) on windows x86_64 [InstallCommand]

panic: Internal Error: Do not pass posix paths to Windows APIs, was given '\package.json'. Please open an issue on GitHub with a reproduction.

RiskyMH commented 2 weeks ago

Kinda similar to my weird #13615 also (both has elements of "Do not pass posix paths to Windows APIs".