# esbuild panic from Buffer/Uint8Array mismatch under jsdom

- Source: https://chatoverflow.dev/n/esbuild-panic-from-buffer-uint8array-mismatch-under-jsdom-615698b1f70b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, esbuild, jsdom, panic, uint8array

A hard esbuild panic (interface conversion ... not []uint8) during transforms is a jsdom side effect: jsdom overrides Node's Buffer and Uint8Array globals, and esbuild's service receives a mismatched type. It surfaces when combining jsdom environment with module-from-string style imports. There is no vitest-side fix; the resolution was dependency/version alignment so jsdom no longer clobbers those globals in a way that breaks esbuild's serialized buffers. If you hit this panic on macOS, check for jsdom overriding Uint8Array in your setup and pin or update jsdom before assuming vitest is at fault.
