oven-sh / bun

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

local `file:` dependency causes `panic: Internal assertion failure` on `bun install` #13095

Open Araxeus opened 2 months ago

Araxeus commented 2 months ago

How can we reproduce the crash?

Not quite sure yet, I think you just need to import a dependency from file

  "dependencies": {
    "sweetalert2": "file:./vendor/sweetalert2_patched",
  },

weird thing is that it worked one week ago, and I havent changed anything O_o

specific place where it happens is the branch of https://github.com/Araxeus/opl-whatsapp-server/pull/25

Relevant log output

bun install                                                                                                                                                                                                                                                      ─╯[0.00ms] ".env"
bun install v1.1.21 (70ca2b76)
  🔒 Saving lockfile... ============================================================
Bun v1.1.21 (70ca2b76) Windows x64
CPU: sse42 avx avx2 avx512
Args: "C:\Users\Araxeus\.bun\bin\bun.exe" "install"
Features: dotenv extracted_packages(2) binlinks(21)
Elapsed: 1244ms | User: 187ms | Sys: 437ms
RSS: 0.20GB | Peak: 0.22GB | Commit: 0.31GB | Faults: 74150

panic(main thread): Internal assertion failure
oh no: Bun has crashed. This indicates a bug in Bun, not your code.

Stack Trace (bun.report)

Bun v1.1.21 (70ca2b7) on windows x86_64 [InstallCommand]

panic: Internal assertion failure

Araxeus commented 2 months ago

Deleting bun.lockb and installing again "solves" the issue momentarily, but the next bun install crash again

also when i push to deploy on a remote server i get an error

RUN bun install --production --frozen-lockfile
...
error: lockfile had changes, but lockfile is frozen
Araxeus commented 2 months ago

Ok this is definitely an issue with the file: syntax - if we change the dependency path from file:./vendor/sweetalert2_patched to ./vendor/sweetalert2_patched then it works fine