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.
Description
Vite+ global npm commands currently resolve
npmthrough PATH. For commands likevp add -g, the CLI first resolves a Node runtime and prepends its bin directory to PATH, but the install layer still emits the barenpmcommand.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.