vscode-buf icon indicating copy to clipboard operation
vscode-buf copied to clipboard

Buf binary installed through pnpm not found

Open prenaissance opened this issue 2 months ago • 1 comments

Description

When the extension startups or I manually try to start the Language Server via VSCode commands, I get the following error logs:

2025-12-07 18:33:21.520 [info] Looking for Buf on the system $PATH...
2025-12-07 18:33:21.539 [error] Buf is not installed on the OS path: Error: Unable to find buf binary on system $PATH
2025-12-07 18:33:21.540 [error] No installed version of Buf found, cannot start Buf Language Server.

The binary is actually in $PATH:

$ which buf
/home/prenaissance/.local/share/pnpm/buf

The part of my ~/.zshrc config where the $PATH is set for pnpm binary packages (auto-generated by the pnpm installation):

# pnpm
export PNPM_HOME="/home/prenaissance/.local/share/pnpm"
case ":$PATH:" in
  *":$PNPM_HOME:"*) ;;
  *) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end

Environment

  • Shell: zsh
  • VSCode: 1.106.3
  • pnpm: 10.20.0
  • buf-cli: 1.60.0
  • System: Arch Linux x86_64, Kernel version 6.17.9-arch1-1
  • vscode-buf extension: 0.8.1

Workaround

Setting the vscode option manually:

{
  "buf.commandLine.path": "/home/prenaissance/.local/share/pnpm/buf"
}

makes the language server start successfully.

Expected Behavior

Either:

  • Fix the underlying issue, such that the binary available through $PATH is used
  • Adjust the error message to request specifying the vscode setting when $PATH cannot be used.

prenaissance avatar Dec 07 '25 16:12 prenaissance