Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

vp install -g silently skips package lifecycle scripts, breaking script-dependent CLIs

Aperta
#2,766 4 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@liangmiQwQ ci sta già lavorando.

Dal 21/9/2026.

  • #2810 di @liangmiQwQ — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement
Describe the bug

vp install -g does not run package lifecycle scripts. Packages whose bin is produced by postinstall install silently broken: exit 0, the bin shim resolves, the tool errors on first run. There is no warning and no opt-in for global installs.

Reproduced with @opencode/cli 2.0.9 (opencode's v2 docs list a "vite+" install tab claiming no additional flag is needed: anomalyco/opencode#50310):

$ vp --version
vp v0.3.3                 # latest published release
$ vp install -g @opencode/cli
                          # success, no warnings
$ opencode
Error: @opencode/cli's postinstall script was not run.

The installed package keeps a 229-byte placeholder at bin/opencode.exe; the real binary is already present under node_modules/@opencode/cli-darwin-arm64/bin/ — only the postinstall link is missing. Running node postinstall.mjs in the package directory repairs it, until the next vp upgrade re-runs the script-free install. Reproduced twice (fresh install and upgrade).

PR #2336 documents the current state ("vp's own global installs have no scripts", "vp install -g has no --allow-scripts plumbing"), so this reads as a known gap rather than a regression — but I couldn't find an issue tracking the user-visible fallout.

Possible directions: run scripts for global installs (npm parity), or keep skipping them but warn when scripts were skipped and provide an opt-in (--allow-scripts for -g, or a global equivalent of vp pm approve-builds). pnpm's onlyBuiltDependencies plus an install-time warning is a workable precedent for the latter.

Reproduction

No repository — this is global CLI install behavior, reproducible in any directory with the commands below.

Steps to reproduce
  1. Install Vite+ 0.3.3 (latest): curl -fsSL https://vite.plus | bash
  2. vp install -g @opencode/cli — exits 0, no warnings
  3. opencode → Error: @opencode/cli's postinstall script was not run.
System Info
$ vp --version
vp v0.3.3

$ vp env current
Node.js:
  Version    24.21.0
  Source     default
  Bin Path   /Users/legibet/.vite-plus/js_runtime/node/24.21.0/bin/node
  Installed  true
  Mode       managed
Used Package Manager

npm

Logs

No response

Validations
Lingua principale
Rust
Stelle
6k
Fork
271
Merge medio
1g 12h
PR unite (30g)
198

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.