You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: bun install fails on tree-sitter-powershell postinstall (no prebuilds, fallback compile needs VS Build Tools) #25563
'node-gyp.cmd' is not recognized as an internal or external command
error: install script from tree-sitter-powershell exited with 1
A failed bun install can leave node_modules/<pkg>/@types/... symlinks incomplete, causing downstream tsgo --noEmit errors that look like real type problems but disappear after a clean reinstall (e.g. Cannot find name 'Buffer' in packages/shared/test/util/flock.test.ts).
Why
tree-sitter-powershell is in the root package.jsontrustedDependencies array. Bun runs its install script (node-gyp-build):
node-gyp-build first looks for a prebuilt binary in prebuilds/<platform>/
The [email protected] package on npm ships no prebuilds at all (no prebuilds/ directory)
Compare [email protected], which ships prebuilds/{darwin-arm64,darwin-x64,linux-arm64,linux-x64,win32-arm64,win32-x64} — bun install succeeds on Windows for that one
With no prebuild match, node-gyp-build falls back to node-gyp build, which on Windows requires Visual Studio Build Tools (~2 GB install)
Why the native binding isn't actually needed
Both packages/opencode/src/tool/shell.ts and (in the upstream form) any other consumer load tree-sitter-powershell exclusively via the bundled WASM:
The native .node binding produced by node-gyp build is never imported. So compiling it on Mac/Linux is wasted work, and on Windows it's a hard blocker for contributors without VS Build Tools.
Reproduction
On a Windows machine without Visual Studio Build Tools (or node-gyp in PATH)
→ Install aborts mid-way at tree-sitter-powershell postinstall.
Proposed fix
Remove tree-sitter-powershell from the trustedDependencies array in root package.json. Bun then skips the postinstall, the .wasm static file is still shipped from the npm package, and runtime usage is unaffected on every platform.
Activity
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.