From 590bda7491a4e376bc854150cf231205b4d158b5 Mon Sep 17 00:00:00 2001 From: Sergey Bahmatov Date: Mon, 5 Oct 2026 15:44:30 +0500 Subject: [PATCH] fix: add debug for yarn binary path and version in _pick_yarn_cmd --- npm_install.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/npm_install.py b/npm_install.py index d4271a5..1459f23 100644 --- a/npm_install.py +++ b/npm_install.py @@ -1989,7 +1989,11 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path): """Find working yarn command (requires Yarn 4.x or higher).""" # Check yarn in PATH - if shutil.which("yarn"): + yarn_bin = shutil.which("yarn") + if yarn_bin: + result = subprocess.run([yarn_bin, "--version"], capture_output=True, text=True, timeout=5) + if DEBUG: + print(f" debug pick: yarn_bin={yarn_bin}, version={result.stdout.strip()}, major={_get_yarn_major_version(['yarn'])}") major = _get_yarn_major_version(["yarn"]) if major and major >= 4: return ["yarn"]