Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`cache clear` does not remove `lastKnownGood.json` from cache

オープン
#675 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
node.js, typescript
領域
cli, tooling

調査の方向性

まず corepack cache clear の実装と README に記載されているキャッシュの動作を確認し、次に記載された Ubuntu コマンドを使って問題を再現します。コマンドが $HOME/.cache/node/corepack 配下にファイルを残さないか、README が意図された例外を正確に文書化し、その動作が適切なテストでカバーされていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Current behavior

corepack cache clear does not fully clear the Corepack cache. It leaves behind lastKnownGood.json, removing only the install folder v1 from the Corepack cache.

Expected behavior

The README document says;

corepack cache clean

Clears the local COREPACK_HOME cache directory.

COREPACK_HOME can be set in order to define where Corepack should install the package managers. By default it is set to %LOCALAPPDATA%\node\corepack on Windows, and to $HOME/.cache/node/corepack everywhere else.

so the expectation is that after executing corepack cache clear on Linux, there will be no files left in the $HOME/.cache/node/corepack directory.

Alternatively, if it is intentional to not delete the lastKnownGood.json file from the Corepack cache, then the documentation should be changed.

Steps to reproduce

Ubuntu 24.04.2 LTS, Node.js 22.14.0 LTS, Corepack 0.32.0

rm -rf ~/.cache/node/corepack
npm install corepack@latest -g
corepack install -g yarn@latest
corepack cache clear
find ~/.cache/node/corepack

Logs

Installing yarn@4.7.0...
/home/mike/.cache/node/corepack
/home/mike/.cache/node/corepack/lastKnownGood.json
主要言語
TypeScript
スター
3.8k
フォーク
279
平均マージ
1時間 47分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nodejs/corepack のほかの issue

nodejs/corepack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。