`npx --package=vite-plus vp create` fails with exit 127 when npm is the chosen package manager
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nodejs, typescript
Línea de trabajo
El error está en cómo vp create construye el entorno para el ejecutor de plantillas: prependToPathToEnvs(..., { ...process.env }) en packages/cli/src/create/discovery.ts pasa npm_config_package a la llamada anidada npx create-vite@latest. Empieza leyendo esa función y luego reproduce el problema con el comando del issue o con el fragmento de execSync. Se considera terminado cuando la ejecución seleccionada con npm tiene éxito y las claves exclusivas de npm exec se eliminan del entorno del proceso hijo, con una prueba de regresión en discovery.spec.ts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
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
vpruns it, with no outernpx; pnpm dlx --package vite-plus vp createruns it;- pnpm, Yarn, or Bun is the selected package manager;
npm_config_packageis removed from the environment beforevpstarts.
Reproduction
No repository is needed. Run from an empty directory.
Steps to reproduce
npx --yes --package vite-plus vp create vite:application --directory app \
--package-manager npm --no-agent --no-editor --no-git --no-hooks --no-interactive --verbose
Output:
● Running: npx create-vite@latest app --no-interactive --no-immediate --no-rolldown
npm notice run 'create-vite@latest' app --no-interactive --no-immediate --no-rolldown
sh: create-vite@latest: command not found
Exit code 127. app is not created.
Minimal npm-only reproduction of the mechanism, without Vite+:
npx --yes --package cowsay node -e 'require("child_process").execSync("npx --yes create-vite@latest --help", { stdio: "inherit" })'
# sh: create-vite@latest: command not found (exit 127)
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.
- Lenguaje dominante
- Rust
- Estrellas
- 6k
- Forks
- 274
- Merge medio
- 1 d 11 h
- PR fusionados (30 d)
- 206
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de voidzero-dev/vite-plus
-
pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voidzero-dev/vite-plus#2882 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/vite-plus#2097 · 10 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Windows: PowerShell installer (1.1.0) does not add vite-plus\bin to user PATH — 'vp' not recognizedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
voidzero-dev/vite-plus#2984 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
pending triage
Dificultad 3/5 1-2 días Aptitud para principiantes 40/100
voidzero-dev/vite-plus#2983 ·
Los mantenedores suelen responder en 1 día
-
Concurrent first runs of `vp config` in linked worktrees fail with "could not lock config file"Posiblemente ocupada @naokihaba la tomó hace 2 días. Abiertopending triage
voidzero-dev/vite-plus#2959 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de voidzero-dev/vite-plus
Issues similares
-
C-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rust-lang/rust-analyzer#23501 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
[Bug]: Web chat input doesn't regain focus after a reply finishesPosiblemente ocupada @GaijinSystems la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zeroclaw-labs/zeroclaw#11658 ·
Los mantenedores suelen responder en 2 días
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
bytecodealliance/wasm-tools#2768 ·
Los mantenedores suelen responder en 1 día