`cache: yarn` doesn't work for a self hosted runner
See original GitHub issueIn the documentation, there is a section called Caching packages dependencies
, which suggests to use cache: yarn
for caching yarn dependencies.
On GitHub runners, it works, since GitHub runners have both node and yarn already installed, and therefore there is no problem. On self-hosted runner, this is not a case.
Which leads us to a catch-22 situation: setup-node action actually expects node to be installed (together with yarn).
Therefore, the action itself fails (since it cannot run yarn during setup).
My proposal is maybe to actually install yarn during the action, at least if we need it for action to success.
Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:12 (1 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 >GitHub Actions — Solving actions/cache@v2 for self-hosted ...
In this story, I am going to present an alternative solution to actions/cache Github action. This solution is mostly for self-hosted runners ......
Read more >Questions & Answers | Yarn - Package Manager
A list of answers to commonly asked questions.
Read more >Pipeline caching - Azure - Microsoft Learn
On the first run after the task is added, the cache step will report a "cache miss" since the cache identified by this...
Read more >Yarn caching doesn't work - Visual Studio Feedback
Please check if the “YARN_CACHE_FOLDER” variable is valid. You also could try to use the other kinds of agents , for example: Windows-2019...
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
So, basically the idea is to not use setup node to set up node on the self hosted runners?
Basically, I have to install node, to be able to install node. That sounds counterintuitive, and wrong