GitHub Actions Cache Miss on Every Run (`hashFiles` Path Mismatch)
`hashFiles('**/package-lock.json')` returned empty string or lockfile was not committed.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: GitHub Actions Cache Miss on Every Run (`hashFiles` Path Mismatch)
Platform: CI/CD
Common Root Causes:
- `hashFiles('**/package-lock.json')` returned empty string or lockfile was not committed.
Interactive Diagnostic Checklist
Verified Solutions:
- Commit lockfile and point `hashFiles` to its exact repository path.
Safe Diagnostic Command:
Check cache key logged in workflow run
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
`hashFiles('**/package-lock.json')` returned empty string or lockfile was not committed. Recommended diagnostic: `Check cache key logged in workflow run`. Remediation: Commit lockfile and point `hashFiles` to its exact repository path.
Worked Examples
- Run `Check cache key logged in workflow run` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-gha-cache-restore-miss-lockfile · Independently verified: 2026-11-25