fix: clean Yarn 4.x PnP files before yarn install

PnP files (.pnp.cjs, .pnp.d.ts, .pnp.loader.mjs) can cause stale
typescript patch resolution errors (ENOENT _tsc.js). Clean them
before yarn install and before retry.
This commit is contained in:
iamninja committed 2026-10-05 14:12:05 +05:00
1 parent 7cf0a6f475
commit 56e16c3996
2 files changed
+16

No files matched your search

+6
View File
@@ -2034,6 +2034,12 @@ def _build_frontend(src_frontend: Path, dest_frontend: Path):
except Exception:
pass
# Clean Yarn 4.x PnP files that can cause stale patch resolution
for pnp_file in [".pnp.cjs", ".pnp.d.ts", ".pnp.loader.mjs"]:
p = src_frontend / pnp_file
if p.exists():
p.unlink()
# Clean cache
try:
run(yarn_cmd + ["cache", "clean"], check=False)