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 issue in pnpm 7

See original GitHub issue

Description: Cache is not used in the action as expected. 0 package are reused by pnpm.

Run pnpm install --frozen-lockfile
Lockfile is up to date, resolution step is skipped
Progress: resolved 1, reused 0, downloaded 0, added 0
Packages: +22[8](https://github.com/Cap-go/capgo/actions/runs/3262889396/jobs/5360721055#step:5:9)2

Action version: actions/setup-node@v3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version: Nodejs 16 pnpm 7

Repro steps:
This is the public action who fail, you can find the code in the second link https://github.com/Cap-go/capgo/actions/runs/3262889396/jobs/5360721055 https://github.com/Cap-go/capgo/actions/runs/3262889396/workflow

Expected behavior: cache should make pnpm reuse package between run of the same job. The goal is to reduce build time and action usage by keeping cache of plugin between job ( who happen in every commit)

Actual behavior: not reused

Linked to https://github.com/actions/setup-node/issues/479

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
marko-zivic-93commented, Oct 18, 2022

Hello @riderx, Thank you for creating this issue. We will investigate it and come back to you as soon as we have some information related to it 😃

0reactions
riderxcommented, Oct 27, 2022

hey @dmitry-shibanov thank you so much for your insights, I was able to resolve my issue by adding a cache step on the main branch before the CI on tag just here : https://github.com/Cap-go/capgo/blob/36b3f36d1d42954534ac98116f4a1ab6f0da4a41/.github/workflows/bump_version.yml#L36 It’s not ideal, since building each tag seems logical without building the main, but that have reduce my install time from 2 min to 9 sec ^^

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cache issue in pnpm 7 #479 - actions/setup-node - GitHub
The setup-node action does not cache node_modules. It caches global cache directory. Besides, you're using latest version for the pnpm action ...
Read more >
Frequently Asked Questions - PNPM
pnpm creates hard links from the global store to the project's node_modules folders. Hard links point to the same place on the disk...
Read more >
pnpm/CHANGELOG.md - UNPKG
- New setting added: `cache-dir`. `cache-dir` is the location of the package metadata cache. Previously this cache was stored in the store directory....
Read more >
pnpm/pnpm - Gitter
I tested pnpm ono 7 projects of mine and this is the only option that made ... 1) How to remove cached packages?...
Read more >
PNPM Compatibility DB - Rush.js
These fixups solve known issues that the official maintainer of an NPM ... Compatibility DB is implemented by PNPM versions >= 6.32.12 ,...
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