From fe754e15b938b2d59cd785ac32d893dc5dc461be Mon Sep 17 00:00:00 2001 From: Sergey Bahmatov Date: Mon, 5 Oct 2026 14:34:02 +0500 Subject: [PATCH] fix: preserve .yarnrc.yml during yarn cleanup .yarnrc.yml configures Yarn 4.x mode; removing it breaks yarn detection and prevents yarn 4.x reinstallation on retry. --- npm_install.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/npm_install.py b/npm_install.py index 715e8b3..e3e554b 100644 --- a/npm_install.py +++ b/npm_install.py @@ -2028,10 +2028,9 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path): def _cleanup_yarn_artifacts(): """Remove corrupted yarn artifacts.""" + # Do NOT remove .yarnrc.yml - it configures Yarn 4.x mode cleanup_paths = [ Path("/root/.yarn"), - Path("/root/.yarnrc.yml"), - Path("/root/.yarnrc"), Path(os.path.expanduser("~/.config/yarn")), ]