`vp env pin`: lockfile not updated after changing `devEngines.runtime`

Aperta
#3,371 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@liangmiQwQ ci sta già lavorando.

Dal 6/11/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

pending triage triage: failed
Describe the bug

vp env pin updates devEngines.runtime in package.json but leaves pnpm-lock.yaml at the old node@runtime: version. vp outdated then shows the old version as current, and vp install --frozen-lockfile (e.g. in CI) fails.

Expected: refresh the lockfile, or at least tell the user to run vp install.

Reproduction

N/A (empty directory is enough)

Steps to reproduce
cd "$(mktemp -d)"
echo '{"name":"x"}' > package.json
vp env pin 24.21.0 [email protected] --target dev-engines
vp install
vp env pin lts --target dev-engines  # resolves to 26.13.0
grep -A1 '"node"' package.json       # "version": "26.13.0"
grep 'runtime:' pnpm-lock.yaml       # still runtime:24.21.0
vp outdated                          # node (dev): current 24.21.0
vp install --frozen-lockfile         # fails
System Info
$ vp env current
Node.js:
  Version    26.13.0
  Source     devEngines.runtime
  Installed  true
  Mode       managed

Package Manager:
  Name       pnpm
  Version    12.18.0
  Source     devEngines.packageManager
  Installed  true
  Mode       managed

$ vp --version
vp v1.5.0
Used Package Manager

pnpm

Logs
$ vp outdated
┌────────────┬─────────┬─────────┐
│ Package    │ Current │ Latest  │
├────────────┼─────────┼─────────┤
│ node (dev) │ 24.21.0 │ 26.13.0 │
└────────────┴─────────┴─────────┘

$ vp install --frozen-lockfile
Error: ERR_PNPM_OUTDATED_LOCKFILE

  × installing dependencies
  ╰─▶ Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up
      to date with package.json.

        Failure reason:
        specifiers in the lockfile don't match specifiers in package.json:
      * in importers["."]:
      * 1 dependency is mismatched:
        - node (lockfile: runtime:24.21.0, manifest: runtime:26.13.0)
  help: Regenerate the lockfile with `pnpm install --lockfile-only` so that
        pnpm-lock.yaml reflects the current package.json, then re-run `pnpm
        install --frozen-lockfile`.
Lingua principale
Rust
Stelle
6.5k
Fork
297
Merge medio
1g 4h
PR unite (30g)
238

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus

Tutte le issue di voidzero-dev/vite-plus

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.