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.
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.
steps:
- restore_cache:
keys: [deps-v1-{{ checksum "package-lock.json" }}]
- run: npm ci
- save_cache:
key: deps-v1-{{ checksum "package-lock.json" }}
paths:
- node_modulesHow to prevent it
- Run the install step before save_cache.
- Cache the exact directory your tooling produces.
- Order restore_cache, install, then save_cache.