fix: uninstall yarn 1.x before corepack prepare and fix corepack indent

This commit is contained in:
iamninja committed 2026-10-05 15:29:45 +05:00
1 parent 2b92e7b6d6
commit bcdcc09cce
1 file changed
+3
+3
View File
@@ -2173,6 +2173,9 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
# METHOD 1: Corepack (recommended for Yarn 4.x)
if shutil.which("corepack"):
try:
# Uninstall old yarn 1.x to prevent conflicts
subprocess.run(["npm", "uninstall", "-g", "yarn"], check=False, cwd="/tmp")
# Enable corepack
subprocess.run(
["corepack", "enable"],