vpr appears not to preserve the pnpm lifecycle environment, causing npm-run-all2 to fall back to npm
メンテナーはふだん 1 日以内に返信
@naokihaba がすでに取り組んでいます。
2026年9月25日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- javascript, rust
調査の方向性
リンクされた vue-demo リポジトリで pnpm run check と vpr check を比較して、その動作を再現します。vpr が npm_execpath などのパッケージマネージャーのライフサイクル変数をどのように提供するかを追跡し、続いて npm-run-all2 が pnpm で子スクリプトを起動し、並列コマンドが EBADDEVENGINES なしで成功することを確認します。
索引モデルが issue の本文から書いたものです。
説明
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 checkshould 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 checksucceeds.vpr checkcausesrun-pto invoke npm for the child scripts.- npm fails because
devEngines.packageManagerrequires 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
-
Clone the reproduction repository.
-
Install dependencies:
vp i -
Run the parallel script directly through pnpm:
pnpm run checkAll three child scripts complete successfully.
-
Run the same script through Vite+:
vpr check -
Observe that
npm-run-all2invokes the child scripts using npm instead of pnpm. npm then exits withEBADDEVENGINESbecause the project declares pnpm indevEngines.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
- Read the Contributing Guidelines.
- Check that there isn't already an issue for the same bug.
- Confirm this is a Vite+ issue and not an upstream issue (Vite, Vitest, tsdown, Rolldown, or Oxc).
- The provided reproduction is a minimal reproducible example.
- 主要言語
- Rust
- スター
- 6k
- フォーク
- 274
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 198
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/vite-plus のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
voidzero-dev/vite-plus#2970 ·
メンテナーはふだん 1 日以内に返信
-
PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails対応中かも @fengmk2 が 2 日前に担当しました。 オープンbug pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#2934 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Skip the `vpr` hint when the script runs the same built-in対応中かも @kshanxs が 1 日前に担当しました。 オープンpending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
voidzero-dev/vite-plus#2892 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#2882 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`lazyPlugins` docs: dynamic import of a local module still slows down config loading対応中かも @kshanxs が 1 日前に担当しました。 オープンdocumentation pending triage
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
voidzero-dev/vite-plus#2875 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/vite-plus の issue をすべて見る
似ている issue
-
bug user-priority/P2
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rescript-lang/rescript#8765 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nautechsystems/nautilus_trader#5287 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
farion1231/cc-switch#8072 ·
メンテナーはふだん 1 日以内に返信
-
Python 3.15 support対応中かも @amnesiaof が今日担当しました。 オープンL: python L: python:uv
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dependabot/dependabot-core#16524 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信