Windows: yarn/npm commands produce no output in Bash tool

Status Open
Maintainer reply None cached
Activity 6 comments · opened Jan 19, 2026

Description

On Windows, running yarn or npm commands via the Bash tool returns immediately with no output. The commands execute (or appear to), but stdout/stderr are not captured.

Environment

  • Platform: Windows (win32)
  • Shell: Git Bash (MINGW64)
  • Yarn version: 1.22.19

Steps to Reproduce

  1. Run any yarn command via the Bash tool:
yarn --version

Result: (No content) or Tool ran without output or errors

  1. Run npm commands:
npm --version

Result: Same - no output

Expected Behavior

Should return the version number (e.g., 1.22.19 for yarn)

Actual Behavior

Returns immediately with no output captured.

Workaround

Wrapping yarn/npm commands in node's child_process works:

node -e "const {execSync} = require('child_process'); console.log(execSync('yarn --version', {encoding: 'utf8', stdio: 'pipe'}))"

This correctly outputs: 1.22.19

Additional Context

  • Other bash commands work fine (ls, pwd, which yarn, etc.)
  • node -e "console.log('test')" works fine
  • This was working a few days ago, suggesting a regression
  • The issue appears specific to how yarn/npm handle their output streams on Windows when not attached to a TTY

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗