Skip to content

fix(env): keep vp install on the system npm in system-first mode - #3595

Open
voidzero-bot[bot] wants to merge 1 commit into
mainfrom
triagebot/fix-3592
Open

voidzero-bot[bot] wants to merge 1 commit into
mainfrom
triagebot/fix-3592

Conversation

@voidzero-bot

@voidzero-bot voidzero-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

With Node.js in managed mode and npm in system-first mode, vp install ran the npm bundled inside the managed Node.js installation instead of the system npm first on PATH, even though system-first mode promises to prefer system tools. prepend_js_runtime_to_path_env puts the managed Node.js bin directory at the front of PATH, and because that directory also contains npm, the subsequent system-first lookup mistook Vite+'s own prepend for a parent's selection and reused the bundled npm.

vp install and prepend_js_runtime_to_path_env now resolve the system package manager before the managed Node.js bin directory is prepended, and dispatch it by absolute path. A managed npm genuinely placed first on PATH by a parent process is still reused, and the system npm's directory is never moved to the front, so it cannot shadow the managed Node.js through another node in a shared directory. The system_first_path snapshot fixture gains a case asserting that vp install runs the system npm both with and without the managed bin directory on PATH.

Closes #3592

Automated triage bot fix (AI-assisted).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://triagebot-fix-3592-viteplus-dev.voidzero-docs.workers.dev (commit a111e1c)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a7fe8d1c-viteplus-dev.voidzero-docs.workers.dev a111e1c 2026-11-28T06:40:26.659Z Visit the dashboard ↗

@github-actions

Copy link
Copy Markdown
Contributor

CLI artifact sizes (a111e1c)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.40 MiB 2.40 MiB 0 B (0.00%)
packages/core/dist Directory total 4.11 MiB 4.11 MiB 0 B (0.00%)
Combined package dist Directory total 6.51 MiB 6.51 MiB 0 B (0.00%)
vp (Linux x64) Binary 9.11 MiB 9.11 MiB 0 B (0.00%)
vp (Linux x64) gzip -9 4.18 MiB 4.18 MiB +352 B (+0.01%)
NAPI (Linux x64) Binary 37.34 MiB 37.34 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 14.93 MiB 14.93 MiB 0 B (0.00%)
vp (macOS ARM64) Binary 5.99 MiB 5.99 MiB +16 B (+0.00%)
vp (macOS ARM64) gzip -9 3.57 MiB 3.57 MiB -213 B (-0.01%)
NAPI (macOS ARM64) Binary 43.86 MiB 43.86 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 19.06 MiB 19.06 MiB 0 B (0.00%)
vp (Windows x64) Binary 7.11 MiB 7.11 MiB +512 B (+0.01%)
vp (Windows x64) gzip -9 3.26 MiB 3.26 MiB +333 B (+0.01%)
NAPI (Windows x64) Binary 33.28 MiB 33.28 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 13.65 MiB 13.65 MiB -2 B (-0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 4.69 MiB 4.69 MiB 0 B (0.00%)
Installer (Windows x64) gzip -9 2.25 MiB 2.25 MiB 0 B (0.00%)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vp install runs the npm bundled with managed Node.js when npm is system-first

0 participants