Interview Prep/CI/CD/GitLab CI Failures

Cache is not restored: `WARNING: node_modules/: no matching files`.

BeginnerTroubleshootingGitLab CI Failures
Answer

Likely causes → Paths are relative to project dir and must be inside it; nothing produced the path in the earlier job; the key changes.

Diagnose → Read the cache section of the job log (key, paths, hit or miss).

Fix → Cache .npm/ and set npm_config_cache, use key: files:.

Prevent → Use policy: pull where jobs only read.

All CI/CD questions Roadmap: GitLab CI/CD

More on GitLab CI Failures