Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#3,091 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
nodejs, rust
Domaine
build-system

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.
Langage dominant
Rust
Étoiles
6.3k
Forks
283
Merge moyen
1 j 12 h
PR mergées (30 j)
205

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de voidzero-dev/vite-plus

Toutes les issues de voidzero-dev/vite-plus

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.