Skip to content

Forward various commands using vp pm #1038

Closed
Closed

Description

@thinceller

Description

I am looking to introduce Vite+ into an existing project that uses pnpm. However, in our project, we perform a minimal dependency resolution during the container build using pnpm deploy. When I try to execute the pnpm deploy command via vp pm, I get the error: Command 'deploy' not found.

If the vp pm command could forward all commands to the package manager, it would make the transition to Vite+ much smoother.

Suggested solution

The vp pm command should forward all subcommands to the package manager.

Alternative

In my use case, being able to run the vp pm deploy command would allow for a smooth transition to Vite+.

Additional context

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.

Activity

  1. cpojer commented on Mar 20, 2026

    @cpojer
    Member

    We don't support every single package manager command as we aim to provide a common interface across all package managers. deploy is implemented by some, but not by all.

    If you rely on pnpm's deploy command, I suggest defining a deploy script that does pnpm deploy. Then you can use vp run deploy.

  2. thinceller commented on Mar 20, 2026

    @thinceller
    Author

    If you rely on pnpm's deploy command, I suggest defining a deploy script that does pnpm deploy. Then you can use vp run deploy.

    This workaround seems like it will work well.
    Thank you for the response.

  3. thinceller commented on Mar 21, 2026

    @thinceller
    Author

    @cpojer By the way, the documentation for the vp pm command states the following:

    - `vp pm <command>` forwards directly to the resolved package manager

    As you explained, vp pm provides a common interface that works across multiple package managers rather than forwarding commands directly. In fact, the "forwards directly" wording is part of what led me to expect that vp pm deploy would work.

    Would it be worth updating the documentation to more accurately describe what vp pm does?

  4. cpojer commented on Mar 23, 2026

    @cpojer
    Member

    Yes that is a good point and we might be repeating this incorrectly in a few places across the repo. Do you wanna send a PR?

  5. GoodbyeNJN commented on May 16, 2026

    @GoodbyeNJN

    @cpojer I firmly believe this feature is necessary.

    We don't support every single package manager command as we aim to provide a common interface across all package managers. deploy is implemented by some, but not by all.

    But in fact, version v0.1.21 introduced a dedicated vp pm plugin subcommand specifically for yarn, which actually contradicts what you said about "provide a common interface across all package managers." Since a special case has already been created for yarn, should special cases also be created for npm x, pnpm y, and bun z? Instead of creating special cases for various possible user needs in the future, it's better to directly support transparent forwarding.

    So I propose:

    • For the command vp pm <cmd> [options], first check if cmd is a known command
    • If so, then process according to the current logic
    • If not, then transparently forward cmd and options to the package manager under the hood, whether cmd and options are valid should be confirmed by the user themselves
  6. fengmk2 commented on May 18, 2026

    @fengmk2
    Member

    We don't support every single package manager command as we aim to provide a common interface across all package managers.

    @jong-kyung vp pm plugin broke this rule, we need to revert #1540

  7. jong-kyung commented on May 19, 2026

    @jong-kyung
    Collaborator

    @fengmk2 Thanks for the clarification. I’ll open a revert PR for #1540.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions