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

vpr appears not to preserve the pnpm lifecycle environment, causing npm-run-all2 to fall back to npm

クローズ
#2,317 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@naokihaba がすでに取り組んでいます。

2026年9月25日 から。

評価

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

調査の方向性

リンクされた vue-demo リポジトリで pnpm run check と vpr check を比較して、その動作を再現します。vpr が npm_execpath などのパッケージマネージャーのライフサイクル変数をどのように提供するかを追跡し、続いて npm-run-all2 が pnpm で子スクリプトを起動し、並列コマンドが EBADDEVENGINES なしで成功することを確認します。

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

説明

bug contribution welcome
Describe the bug

In a project configured to use pnpm, running a package script through vpr causes npm-run-all2 / run-p to invoke child scripts with npm instead of pnpm.

The same script works correctly when launched with pnpm run.

The project declares pnpm as its package manager. When run-p is launched by pnpm, it correctly uses pnpm for the child scripts. When it is launched by vpr, it falls back to npm, which then fails with EBADDEVENGINES because the project only permits pnpm.

Expected behavior:

  • vpr check should preserve enough package-manager lifecycle environment for child process runners to detect pnpm.
  • Child scripts should be executed using pnpm, consistently with pnpm run check.

Actual behavior:

  • pnpm run check succeeds.
  • vpr check causes run-p to invoke npm for the child scripts.
  • npm fails because devEngines.packageManager requires pnpm.

This appears to happen because the environment provided by vpr differs from the environment provided by pnpm run, particularly package-manager lifecycle variables such as npm_execpath.

A serial workaround that explicitly invokes pnpm works, but it loses parallel execution. In my project, the parallel command takes 3.94 seconds, while the serial workaround takes 6.35 seconds.

Reproduction

https://github.com/bling-yshs/vue-demo/tree/archive/vp

Steps to reproduce
  1. Clone the reproduction repository.

  2. Install dependencies:

    vp i
    
  3. Run the parallel script directly through pnpm:

    pnpm run check
    

    All three child scripts complete successfully.

  4. Run the same script through Vite+:

    vpr check
    
  5. Observe that npm-run-all2 invokes the child scripts using npm instead of pnpm. npm then exits with EBADDEVENGINES because the project declares pnpm in devEngines.packageManager.

System Info
D:/code/Webstorm/vue-demo
$ vp env current
VITE+ - The Unified Toolchain for the Web

Environment:
  Version       24.19.0
  Source        .node-version
  Source Path   D:\code\Webstorm\vue-demo\.node-version
  Project Root  D:\code\Webstorm\vue-demo

Tool Paths:
  node  C:\Users\yshs\.vite-plus\js_runtime\node\24.19.0\node.exe
  npm   C:\Users\yshs\.vite-plus\js_runtime\node\24.19.0\npm.cmd
  npx   C:\Users\yshs\.vite-plus\js_runtime\node\24.19.0\npx.cmd

Package Manager:
  Name          pnpm
  Version       11.20.0
  Source        devEngines.packageManager
  Source Path   D:\code\Webstorm\vue-demo\package.json
  Project Root  D:\code\Webstorm\vue-demo
  Bin Path      C:\Users\yshs\.vite-plus\package_manager\pnpm\11.20.0\pnpm\bin\pnpm.cmd
D:/code/Webstorm/vue-demo
$ vp --version
VITE+ - The Unified Toolchain for the Web

vp v0.2.7

Local vite-plus:
  vite-plus  v0.2.7

Tools:
  vite             v8.1.5
  rolldown         v1.2.0
  vitest           v4.1.10
  oxfmt            v0.60.0
  oxlint           v1.75.0
  oxlint-tsgolint  v7.0.2001
  tsdown           v0.22.14

Environment:
  Package manager  pnpm v11.20.0
  Node.js          v24.19.0 (.node-version)
Used Package Manager

pnpm

Logs

Validations
主要言語
Rust
スター
6k
フォーク
274
平均マージ
1日 12時間
マージ済み PR(30日)
198

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

voidzero-dev/vite-plus のほかの issue

voidzero-dev/vite-plus の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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