oven-sh / bun

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

panic(main thread): access of union field 'git_clone' while field 'package_manifest' is active oh no: Bun has crashed. This indicates a bug in Bun, not your code. #12145

Open alex72598 opened 4 months ago

alex72598 commented 4 months ago

How can we reproduce the crash?

windows 11 run:

bun install

image

Relevant log output

[0.00ms] ".env"
bun install v1.1.17 (bb66bba1)
============================================================
Bun v1.1.17 (bb66bba1) Windows x64
Args: "D:\Program Files\nodejs\node_modules\bun\bin\bun.exe" "install"
Features: bunfig dotenv git_dependencies 
Elapsed: 20ms | User: 0ms | Sys: 15ms
RSS: 99.26MB | Peak: 99.26MB | Commit: 0.16GB | Faults: 24484

panic(main thread): access of union field 'git_clone' while field 'package_manifest' is active
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:

Stack Trace (bun.report)

Bun v1.1.17 (bb66bba) on windows x86_64 [InstallCommand]

panic: access of union field 'git_clone' while field 'package_manifest' is active

alex72598 commented 4 months ago

I tried it today, and the installation was successful. I suspect it is a network problem.

alex72598 commented 4 months ago

Oh no, I still can't. I was wrong just now. In fact, I found that there is a dependency package in packages.json that doesn't work when it is set as a git repository.

image

zakharsmirnoff commented 4 days ago

I faced the same issue today. It happens only if there is a dependency specified from git source and only on Windows. Tried running the same code on Linux - it works.

It's probably related to this issue raised for zig language: https://github.com/ziglang/zig/issues/19211 The strangest thing is that it was working for a while and then just stopped. I haven't changed any environment configuration, and couldn't determine the cause