flisk up: exit code 127 from a missing project binary is reported as 'web2 runs bun, which is not installed' (bun is installed)

Abierto
#116 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bun, typescript
Área
cli

Línea de trabajo

Start by tracing how flisk up handles exit codes 126/127 and turns service logs into restart and status messages; inspect the service command handling and existing tests for these paths. Reproduce with a local service whose script cannot find vite, then check the case where the service's first command is missing from PATH. Done when the error names the missing project binary, suggests installing dependencies, and exits after one attempt for 126/127.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

area: cli bug dogfood dx error-messages first-run has-repro help wanted misleading-message needs-test priority:medium tech: bun tech: typescript triaged

Summary

When a local service's script cannot find its own tool (here vite, because bun install was never run in that folder), the shell exits 127. flisk up turns every 127 into "runs bun, which is not installed", which is false and points at the wrong fix.

Repro (flisk 1.4.73, Bun 1.4.4 installed at ~/.bun/bin/bun)

flisk project --yes
flisk resource web2 --type frontend --framework vue --path web2 --local --stack app --yes
sed -i '' 's/npm run dev/bun run dev/' web2/service.json   # (works around #108)
flisk up      # note: no `bun install` in web2

Output:

web2 | $ vite
web2 | /bin/bash: vite: command not found
web2 | error: script "dev" exited with code 127
web2 | [flisk] exited with code 127: web2 runs bun, which is not installed; restarting in 2s
...
❌ Local processes did not start:
  ✗ web2: runs bun, which is not installed

which bun prints /Users/.../.bun/bin/bun, and the sibling services api and web use the same bun run dev and are healthy.

Numbers

Item Value
Real cause vite not found (dependencies not installed)
Message claim bun not installed
Automatic restarts before giving up 5, with delays 2 s, 4 s, 8 s ... (about 30 s of retries for a deterministic error)
Identical command not found lines in the log 5
Services using the same bun run dev that started fine 2 of 3

Before

The user reinstalls Bun (or edits service.json) instead of running bun install. The same wrong text appears in the live log, the final summary and flisk status (pending (restarting)).

After

  • If the log shows <name>: command not found, say so: web2: 'vite' was not found. Run bun install in web2 (or flisk resource ... --install). Only blame the runtime when the command itself in service.json (first word) is missing from PATH.
  • Do not restart on exit 126/127 (deterministic): fail on the first attempt (1 attempt instead of 5, saves about 28 s).

Acceptance

Repro above prints a message that names vite and suggests installing dependencies, and stops after 1 attempt; a service whose first word is truly missing still reports it as today.

Found by the /dogfood loop. Related: #108, #109.

Lenguaje dominante
TypeScript
Estrellas
1
Forks
2
Merge medio
11 h 39 min
PR fusionados (30 d)
92

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flisk-sh/flisk-cli

Todos los issues de flisk-sh/flisk-cli

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.