Skip to content

Clarify npm resolution for global npm commands #1448

@lyzno1

Description

@lyzno1

Description

Vite+ global npm commands currently resolve npm through PATH. For commands like vp add -g, the CLI first resolves a Node runtime and prepends its bin directory to PATH, but the install layer still emits the bare npm command.

Should global npm commands prefer the npm that belongs to the Node runtime resolved by Vite+, when available, or intentionally keep relying on PATH npm?

Suggested solution

If global commands should follow the resolved Vite+ runtime, they could use the adjacent npm only when it exists and is executable, then fall back to PATH npm otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions