Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`vp env exec` / `vp node` ignore `nodeShimMode: system_first`, download a managed runtime (~192 MB) that `vp env clean` then refuses to remove

Cerrado
#3,093 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@liangmiQwQ ya está trabajando en esto.

Desde el 17/10/2026.

  • #3100 de @liangmiQwQ — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

pending triage

Summary

With nodeShimMode: system_first, vite-plus correctly resolves Node.js to the system runtime for the shims and for vp env current / vp env which. The vp env exec family -- which vp node is a shorthand for -- does not honour that preference: it resolves and downloads a vite-plus managed Node runtime instead.

This is not a matter of preference between two managed versions. It is a divergence between what vite-plus reports and what it dispatches, plus disk growth on a machine that explicitly opted out of Node management.

Expected vs actual

Configuration:

{
  "nodeShimMode": "system_first",
  "packageManagerShimModes": { "bun": "system_first", "npm": "system_first",
                               "pnpm": "system_first", "yarn": "system_first" }
}

What agrees with system_first:

$ node -v
v26.11.1
$ vp env which node
/usr/bin/node
$ vp env current
Node.js:
  Version    26.11.1
  Source     system PATH
  Bin Path   /usr/bin/node
  Mode       system_first

What does not:

$ vp node -v
v24.22.0
$ vp env exec node -v
v24.22.0

vp env exec --help states:

--node <NODE> Node.js version to use (e.g., "20.18.0", "lts", "^20.0.0"). If omitted and command is node/npm/npx or a global package binary, version is resolved automatically (same as shim behavior)

The shim resolves to the system Node, so env exec is not resolving "the same as shim behavior".

Reproduction

Deterministic container, Docker or Podman:

https://gist.github.com/Kat404/0c2bf9a8f0a6942f216a827098e3a24d

podman build -t vp-sysfirst-exec .
podman run --rm vp-sysfirst-exec
CASE A: DIVERGENCE CONFIRMED  shim=v20.19.2  vp-node=v24.22.0
CASE B: 201708991 bytes on disk under js_runtime/node
CASE C: inventory tracks it as: * v24.22.0 current
CASE D: inventory does record it, so uninstall (not clean) is the only removal
CASE E: vp env clean -> ✓ Removed 0 Node.js runtimes

The build fails if the divergence does not reproduce.

Manually, without a container:

vp env off node
vp env off pm
mkdir -p /tmp/repro && cd /tmp/repro
printf '{\n  "name": "repro",\n  "version": "1.0.0",\n  "private": true\n}\n' > package.json
node -v                 # system version
vp env which node       # /usr/bin/node
vp node -v              # vite-plus managed version

Consequences

  1. Unwanted download. Running vp node (or vp env exec node) materialises a managed runtime of roughly 190-220 MB on a machine configured to use the system Node.

  2. vp env clean cannot reclaim it. Once downloaded, the runtime is recorded as the current version:

$ vp env list
Node.js
  * v24.22.0 current

$ vp env clean
✓ Removed 0 Node.js runtimes

Per the docs, vp env clean preserves the current and configured-default versions. So the space comes back every time a project invokes vp node, and the only removal is the explicit vp env uninstall 24.22.0.

  1. Confusing state. vp env list reports * v24.22.0 current while vp env current reports the system 26.11.1 as the resolved environment. Two commands, two different "current" Node runtimes.

Possible fixes

  • Resolve env exec through the same path the shims use, so nodeShimMode: system_first applies to it too.
  • Or: when a runtime is materialised only as an env exec fallback while the environment is system-first, do not record it as the current install, so vp env clean can remove it.

Related, not duplicates

  • #2642 - Concurrent vp run dev processes download the same Node.js runtime twice. Same subsystem, different symptom.
  • #2728 - node shim loops forever in system-first mode when the system node is a mise shim. Same mode, different failure.
  • #2746 / #2758 - Separate system-first shims from the main bin directory (merged; this is why bin/ now holds only vp, vpr, vpx and the rest live in fallback-bin/, appended to PATH).

Environment

  • vite-plus v1.3.0 (vp upgrade --check reports already up to date)
  • Arch Linux, kernel 6.x
  • System Node.js: v26.11.1 at /usr/bin/node (pacman nodejs)
  • Container repro: debian:stable-slim with Debian nodejs v20.19.2 at /usr/bin/node, vite-plus installed via curl -fsSL https://vite.plus | bash
  • Podman 6.1.4
Lenguaje dominante
Rust
Estrellas
6.3k
Forks
283
Merge medio
1 d 14 h
PR fusionados (30 d)
208

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de voidzero-dev/vite-plus

Todos los issues de voidzero-dev/vite-plus

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.