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

vp run skips pnpm's verifyDepsBeforeRun, so scripts run against stale node_modules

Abierto
#3,091 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
nodejs, rust
Área
build-system

Línea de trabajo

Reproduce by making a pnpm workspace's lockfile stale, then compare pnpm run <script> (which installs first) with vp run <script> (which does not). Read how vp run launches package.json scripts and whether it can consult pnpm's verifyDepsBeforeRun setting. Done means a stale workspace behaves consistently under vp run, and npm, yarn and bun are unchanged. The maintainers still need to choose between this fix and documenting the gap.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

pending triage
Description

pnpm 11 made verifyDepsBeforeRun: install the default. Before pnpm run or pnpm exec, pnpm checks that node_modules matches the lockfile and the manifests, and installs first if it doesn't. The check takes about 10 ms when nothing changed.

vp run <script> runs the same package.json scripts itself and does no such check. So after a git pull, a merge or a branch switch that changes the lockfile, pnpm run test works, while vp run test fails with Cannot find module … against stale dependencies.

Tested with vite-plus 1.2.0 and pnpm 12.11.2 on Linux:

  • In a workspace with a stale lockfile, pnpm run <script> installed and then ran.
  • vp run <script> failed with Cannot find module.
  • An strace -e execve of vp run --filter <pkg> lint shows no pnpm process starting.
  • Nothing overrides verifyDepsBeforeRun in the workspace, .npmrc, user config or environment.
Suggested solution

When the workspace's package manager is pnpm, have vp run apply pnpm's verifyDepsBeforeRun setting before running a package.json script: run pnpm's own check, or install, warn or fail as the setting says. With npm, yarn or bun, keep today's behaviour.

Alternative

Document that vp run skips the package manager's dependency check, so teams that rely on it run scripts through pnpm run.

Additional context

This is how our agents and developers got stale node_modules after merges. We now run package scripts with pnpm for this reason.

Validations
  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature. I searched vite-plus and vite-task for verifyDepsBeforeRun, verify-deps-before-run and stale dependencies.
Lenguaje dominante
Rust
Estrellas
6.3k
Forks
283
Merge medio
1 d 11 h
PR fusionados (30 d)
200

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.