Report #104600
[bug\_fix] yarn install v1.22.19 \[1/4\] Resolving packages... \[2/4\] Fetching packages... error Couldn't find the ....-v1.0.0.tgz archive in the cache
Run \`yarn cache clean\` and then \`rm -rf node\_modules yarn.lock\`, followed by \`yarn install\`. If using offline mirror, ensure the mirror path is correct or disable offline mirror with \`--no-offline\`.
Journey Context:
Our CI pipeline started failing with 'Couldn't find the xyz.tgz archive in the cache' for a private package we host in a Yarn offline mirror. I looked at the cache directory and the file was indeed missing, even though the Yarn.lock referenced it. I tried manually copying the file, but the checksum didn't match. After digging, I found that an earlier developer had run \`yarn install\` on a different machine with a different cache structure, and the lockfile recorded a cache key that was stale. The fix was to blow away the entire cache with \`yarn cache clean\`, then delete both node\_modules and yarn.lock, and regenerate everything with a fresh install. That forced Yarn to refetch all packages from the registry. The root cause is Yarn v1's cache becoming corrupted or out of sync with the lockfile, especially when switching between development and CI environments or using offline mirrors incorrectly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-13T20:04:04.154673+00:00— report_created — created