Skip to content

Docs: Vite+ install method doesn't work — vp global installs never run the postinstall script #50310

Closed

Description

@legibet

Description

The v2 docs list Vite+ as an install method and state it needs no extra flag:

vp install -g @opencode/cli … "The Bun and pnpm commands explicitly allow the required script; Vite+ requires no additional flag."
(services/www/src/docs/content/index.mdx, v2 branch)

That claim doesn't hold. vp install -g never runs package lifecycle scripts (current, deliberate Vite+ behavior — voidzero-dev/vite-plus#2336: "vp's own global installs have no scripts", "vp install -g has no --allow-scripts plumbing"). The documented command installs a broken CLI with no warning at install time:

$ vp install -g @opencode/cli
$ opencode
Error: @opencode/cli's postinstall script was not run.

bin/opencode.exe stays the shipped 229-byte placeholder stub; the real binary is already on disk at node_modules/@opencode/cli-<platform>/bin/ — only the postinstall link is missing. Running node postinstall.mjs in the package directory repairs it, but every vp upgrade re-runs the script-free install and breaks it again (reproduced on a fresh 2.0.9 install and on an upgrade).

Same failure class as #48884 — #48885's runtime launcher would fix it for every script-blocking installer, Vite+ included. Filing separately because the docs actively send Vite+ users down this path with an explicit "no additional flag" claim.

Could the Vite+ claim be corrected or removed until #48885 lands? I can send the docs PR.

Plugins

None

OpenCode version

@opencode/cli 2.0.9

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.
  4. bin/opencode.exe in the installed package is a 229-byte stub; the real binary sits unused in node_modules/@opencode/cli-darwin-arm64/bin/

Screenshot and/or share link

No response

Operating System

macOS 27.0, arm64

Terminal

Ghostty

Activity

  1. legibet commented on Sep 21, 2026

    @legibet
    Author

    Filed the Vite+-side report here: voidzero-dev/vite-plus#2766

  2. legibet commented on Sep 21, 2026

    @legibet
    Author

    The trigger may be the vp-managed npm version: npm 12 skips install scripts that allowScripts doesn't cover, and vp only handles that for project installs, not -g (voidzero-dev/vite-plus#2336). The documented command fails silently with managed npm 12 and works with npm 11. Details in voidzero-dev/vite-plus#2766. #48885 would make this moot either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions