Hi,
When I store node_module
in the cache I have this success message :
Creating cache archive...
Uploading cache archive...
Stored Cache to yarn-cache-2-arch1-linux-amd64-6_63-circleci-NBP5Y_4GwrJ6SJdls0Zan4pUzXw+12TTu8bxP3+1f9M=
* /home/circleci/product/frontend/node_modules
But I do a second run to restore the cache I have :
Found a cache from build 48 at yarn-cache-arch1-linux-amd64-6_63-circleci-NBP5Y_4GwrJ6SJdls0Zan4pUzXw+12TTu8bxP3+1f9M=
Size: 2.0 MB
Cached paths:
* /home/circleci/project/frontend/node_modules
* /home/circleci/project/frontend/bower_components
Downloading cache archive...
Validating cache...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Found a cache from build 48 at yarn-cache-arch1-linux-amd64-6_63-circleci-NBP5Y_4GwrJ6SJdls0Zan4pUzXw+12TTu8bxP3+1f9M=
Size: 2.0 MB
Cached paths:
* /home/circleci/project/frontend/node_modules
* /home/circleci/project/frontend/bower_components
Downloading cache archive...
Validating cache...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Found a cache from build 48 at yarn-cache-arch1-linux-amd64-6_63-circleci-NBP5Y_4GwrJ6SJdls0Zan4pUzXw+12TTu8bxP3+1f9M=
Size: 2.0 MB
Cached paths:
* /home/circleci/project/frontend/node_modules
* /home/circleci/project/frontend/bower_components
Downloading cache archive...
Validating cache...
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
Error validating cache from S3: exit status 2
Here are the steps to build the jobs :
test_frontend:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- bower-cache
- restore_cache:
keys:
- yarn-cache-{{ arch }}-{{ .Branch }}-{{ checksum "frontend/yarn.lock" }}
- run: set -x && sudo curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
- run: docker-compose run frontend yarn
- run: docker-compose run frontend ember test --silent
- save_cache:
key: yarn-cache-{{ arch }}-{{ .Branch }}-{{ checksum "frontend/yarn.lock" }}
paths:
- frontend/node_modules
- save_cache:
key: bower-cache
paths:
- frontend/bower_components
My node_module directory takes “356mo”. It works well withe bower, which is smaller.
What can I do?