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

Corepack incorrectly selects prerelease/dev versions of pnpm when no version is specified

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

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

評価

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

調査の方向性

まず corepack use pnpm の解決パスと、pnpm の package.json の読み取り方法を追跡します。ここで説明されている Node.js 20、Corepack 0.34.4、Alpine の環境で動作を再現してください。未指定の pnpm リクエストが最新の安定版リリースを選択し、ハードコードされたレガシーパスではなく、その現在のバイナリエントリパスを使用すれば完了です。

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

説明

After some discussion on the pnpm issue (https://github.com/pnpm/pnpm/issues/10214), it turns out the problem is not caused by a faulty pnpm release, pnpm v11 has changed its binary entry path from bin/pnpm.cjs to bin/pnpm.mjs., so the development build 11.0.0-dev.1005 is not faulty. Corepack is expecting the old path and fails.

So the issue appears to be:

  • Corepack’s version resolution prefers a dev build over the latest stable
  • Corepack seems to rely on a hardcoded pnpm binary path instead of reading the correct bin path from package.json.

As a workaround I'm currently using corepack use pnpm@10.22.0 or corepack use pnpm@latest (or latest-9, latest-10 etc.)

Leaving this update here so the root cause is clearer.

Originally posted by @tkesici in #772

Problem

When running corepack use pnpm, Corepack unexpectedly selects and installs a prerelease development build of pnpm (11.0.0-dev.1005) instead of the latest stable version .

This leads to failure because pnpm v11 is not stable yet and its structure differs from the current pnpm 10.x series.

Expected Behavior

If no version is specified, Corepack should prefer the latest stable release of pnpm (e.g 10.x)

Actual Behavior

corepack use pnpm resolves to: Installing pnpm@11.0.0-dev.1005...

Environment

Node.js: 20 (node:20-alpine)

Corepack: 0.34.4

OS: Alpine Linux

主要言語
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 を短くまとめたダイジェスト。