You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npx --package=vite-plus vp create fails with exit 127 when npm is the chosen package manager #2970
When vp create runs under npx --package=vite-plus and npm is the selected package manager, the template runner fails with sh: create-vite@latest: command not found (exit 127).
npx --package=vite-plus sets npm_config_package=vite-plus in the environment of vp. vp create copies all of process.env into the template runner environment (packages/cli/src/create/discovery.ts, prependToPathToEnvs(..., { ...process.env })). The nested npx create-vite@latest … reads the inherited npm_config_package, so npm installs vite-plus and looks for a bin named create-vite@latest in it, which does not exist.
The same command succeeds when:
the global vp runs it, with no outer npx;
pnpm dlx --package vite-plus vp create runs it;
pnpm, Yarn, or Bun is the selected package manager;
npm_config_package is removed from the environment before vp starts.
Reproduction
No repository is needed. Run from an empty directory.
The same command with npm_config_package deleted from the child environment succeeds.
Suggested fix
Remove the npm exec-only keys inherited from an outer npm exec or npx (npm_config_package, and npm_config_call for npx -c) from envs before vp create spawns the package-manager runner. I am happy to open a pull request with a test in discovery.spec.ts if you want this approach.
System Info
macOS (Darwin 27.0.0)
Node.js 24.21.0
npm 11.19.0 (outer npx); vp installed npm 12.2.0 for the project
vite-plus 1.1.0 (main at c58f28c read for the source reference)
Used Package Manager
npm
Logs
See the output above. The exit code is 127. The outer npm debug log shows only that the parent command failed.
Activity
npx --package=vite-plus vp createdoes not work anymore with 1.1.0 #2920create-vite-plus#2602fix(create): don't leak npx --package env into nested npx (voidzero-d…
fengmk2 commentedon Oct 14, 2026
use
create-vite-pluspackage instead #3028docs(new): point the exit 127 note at #688 and #689 instead of a Vite…