Skip to content
Latchkey

CircleCI save_cache Path Does Not Exist

save_cache archives the listed paths. If a path does not exist when the step runs (wrong name, never created, or built later), CircleCI warns and skips it, so the cache is empty or incomplete.

What this error means

The save_cache step warns that a listed path does not exist and skips it, leading to cache misses on later runs.

circleci
Skipping cache - error: path "/home/circleci/project/node_modules"
does not exist. Nothing to cache for key deps-v1-...

Common causes

Path never created

Dependencies were not installed before save_cache, so the directory is absent.

Wrong path or working directory

The cached path is relative to the working directory and may not match where files landed.

How to fix it

Create the path before caching

Install dependencies before save_cache and cache the exact produced directory.

.circleci/config.yml
steps:
  - restore_cache:
      keys: [deps-v1-{{ checksum "package-lock.json" }}]
  - run: npm ci
  - save_cache:
      key: deps-v1-{{ checksum "package-lock.json" }}
      paths:
        - node_modules

How to prevent it

  • Run the install step before save_cache.
  • Cache the exact directory your tooling produces.
  • Order restore_cache, install, then save_cache.

Frequently asked questions

What causes ""save_cache" path missing"?
Dependencies were not installed before save_cache, so the directory is absent.
How do I fix "save_cache" path missing?
Install dependencies before save_cache and cache the exact produced directory.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card