question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache always not found (yarn + linux)

See original GitHub issue

Hello : )

I’ve tried to apply this action to my workflow but it seems like does not work properly.

On the post action step, it completed with Cache saved successfully. But on the next action event. It always displays Cache not found with the same key.

Could you please a little bit check on this example link ?

My workflow config:

      - name: Get yarn cache
        id: yarn-cache
        run: |
          echo "::set-output name=dir::$(yarn cache dir)"
      - uses: actions/cache@v1.1.0
        with:
          path: ${{ steps.yarn-cache.outputs.dir }}
          key: yarn-

pkg manager: yarn env: Linux

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dhadkacommented, Jan 12, 2020

@joshmgross This looks like an issue with the scope. While this commit is on the master branch, the scopes are referencing the tags, for example refs/tags/v1.0.30, instead of the master branch. Thus, it is successfully committing the cache, but unable to find the cache since the scope is different each time.

@Cerberus this sounds like something we’ll need to fix on the backend. We’ll keep you up to date.

1reaction
Cerberuscommented, Jan 14, 2020

Thank you for your detailed explanation. : )

Actually I planed to cache it on master branch for testing. When I add it, everything should work as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keep getting yarn cache is not found · Issue #410 - GitHub
It can be related to the constant updating of the yarn.lock file, because the yarn install command can update dependencies. It updates the...
Read more >
yarn cache
Yarn stores every package in a global cache in your user directory on the file system. yarn cache list will print out every...
Read more >
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 >
How to cache node_modules in GitHub Actions with Yarn
The first step grabs the yarn cache directory path, and saves it. The second step looks for anything stored in the cache, and...
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found