The Corepack install hint fails on Node.js 25 and later
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, node.js
調査の方向性
lib/package-managers.jsでPACKAGE_MANAGERSのインストールに関する案内を確認し、lib/commands.jsでrunCommand()がそれらをどのように表示し、注入された依存関係を受け入れるかを確認してください。これらの案内に関する既存のテストを確認してから、Node.js 25より前と25以降のバージョンで推奨コマンドを検証してください。pnpmとYarnの案内がサポート対象のすべてのNode.jsバージョンで機能し、両方のケースがテストでカバーされていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
When a project's package manager is not installed, the CLI suggests how to install it. For pnpm and Yarn, the first suggestion is Corepack:
Could not find pnpm, which this project uses. Install it with "corepack enable pnpm" or "npm install --global pnpm".
Node.js no longer ships Corepack since 25.0.0 (nodejs/node#57617, "build: stop distributing Corepack", semver-major; nodejs/node#59835 removed it from the release tarballs). Node.js 26 becomes the active LTS line on 2026-10-28, so a growing share of users will see a first suggestion that fails with corepack: command not found.
The second suggestion, npm install --global …, still works, so nobody is blocked. The first step offered is simply wrong on current Node.js versions.
Steps to reproduce
-
On Node.js 25 or 26, with pnpm not installed, create a pnpm project in a scratch workspace:
mkdir -p /tmp/dws-corepack/pnpm-app echo '{"packageManager":"[email protected]","scripts":{"hello":"echo hello"}}' \ > /tmp/dws-corepack/pnpm-app/package.json -
Start the CLI, open
pnpm-appand runhello:DEV_WORKSPACE_CONFIG=/tmp/dws-corepack/config.json \ npx -p @modulane/[email protected] dws --workspace /tmp/dws-corepack -
Follow the first suggestion:
corepack enable pnpm.
Actual behaviour
The CLI shows:
Could not start command: Could not find pnpm, which this project uses. Install it with "corepack enable pnpm" or "npm install --global pnpm".
On Node.js 25 and later the corepack command is not installed, so the first suggestion fails.
Expected behaviour
The suggestion works on every Node.js version that engines allows. For example:
- on Node.js 25 and later:
npm install --global corepack, thencorepack enable pnpm, ornpm install --global pnpm; - on earlier versions: the current text.
Where
PACKAGE_MANAGERSinpackage-managers.jsholds the install hints;runCommand()incommands.jsshows them.
Suggested fix
- Choose the pnpm and Yarn hints from the running Node.js major version (
process.versions.node). It can be passed in the same waycommands.jsalready accepts injected dependencies, so tests can check both texts. - Alternatively, keep a single text that works everywhere:
npm install --global corepackbeforecorepack enable. That is one step longer on Node.js 24 and earlier, where it is not needed. - The ROADMAP item "show an actionable error naming the tool and how to install it (for example,
corepack enable)" could mention the same.
I'm happy to open a PR with whichever option you prefer.
Environment
@modulane/dev-workspace-cli0.5.0 from npm.lib/is identical onmainat dfccb6b.- The message above comes from
PACKAGE_MANAGERSandrunCommand(). I did not run the CLI on Node.js 25 or 26 myself; Corepack's removal is documented in the 25.0.0 changelog.
- 主要言語
- JavaScript
- スター
- 0
- フォーク
- 0
- 平均マージ
- 43分
- マージ済み PR(30日)
- 20
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modulane/dev-workspace-cli のほかの issue
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
modulane/dev-workspace-cli#26 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 22/100
modulane/dev-workspace-cli#54 ·
メンテナーはふだん 1 日以内に返信
-
enhancement help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
modulane/dev-workspace-cli#53 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
modulane/dev-workspace-cli#52 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
modulane/dev-workspace-cli#51 ·
メンテナーはふだん 1 日以内に返信
modulane/dev-workspace-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
microsoft/monaco-editor#5563 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
account: profile bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 5 日以内に返信
-
ai-driven-fuzzing bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
linagora/cozy-client#1777 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信