Keep getting yarn cache is not found
See original GitHub issueDescription:
Using yarn 1, continue getting yarn cache is not found
on PRs that have run multiple times.
Weirdly, this works on pull_request
but not on push
events.
Push:
Run actions/setup-node@v2
Found in cache @ /opt/hostedtoolcache/node/16.13.2/x64
/usr/local/bin/yarn --version
1.22.17
/usr/local/bin/yarn cache dir
/home/runner/.cache/yarn/v6
yarn cache is not found
Pull request:
Run actions/setup-node@v2
Found in cache @ /opt/hostedtoolcache/node/16.13.2/x64
/usr/local/bin/yarn --version
1.22.17
/usr/local/bin/yarn cache dir
/home/runner/.cache/yarn/v6
Received 151904393 of 156098697 (97.3%), 144.9 MBs/sec
Received 156098697 of 156098697 (100.0%), 128.6 MBs/sec
Cache Size: ~149 MB (156098697 B)
/usr/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/1233a9f5-f0f9-47e9-aaf5-472904875c75/cache.tzst -P -C /home/runner/work/alchemist/alchemist
Cache restored successfully
Cache restored from key: node-cache-Linux-yarn-c29c2173f71392ee46ad40a81d3756710c14774844267556986d4379721c0e46
Action version: @2
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version: yarn 1
Repro steps:
name: Testing
on:
push:
branches:
- '*'
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
jobs:
testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'yarn'
- name: Install dependencies
run: yarn install
Expected behavior: Should cache on both push and pull request events
Actual behavior: Only caches for pull request
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to cache yarn packages in GitHub Actions - Stack Overflow
Solution 3: Caching node_modules with actions/cache (NOT recommended) · yarn is good at utilizing global cache. If the dependencies are already ...
Read more >`yarn cache clean` | Yarn - Package Manager
yarn cache clean. Remove the shared cache files. Usage. $> yarn cache clean. Examples. Remove all the local archives : yarn cache clean....
Read more >Yarn caching doesn't work - Visual Studio Feedback
This could result in the task failing when this “file” does not exist. Please check if the “YARN_CACHE_FOLDER” variable is valid. You also...
Read more >Using modern Yarn for deployment with Node.js on Azure App ...
Or, if .yarn\cache does not exist, set yarn to the latest version (3.x) and install. Both scenarios should produce no ...
Read more >How to clear the cache in Yarn - Reactgo
In this tutorial, we are going to learn about how to clear or remove the cache in yarn. When we install a new...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello @mmahalwy. I can suppose two things:
yarn install
command can update dependencies. It updates theyarn.lock
file and regenerate hash.ty