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

オープン
#116 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
bun, typescript
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
1
フォーク
2
平均マージ
11時間 39分
マージ済み PR(30日)
92

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

flisk-sh/flisk-cli のほかの issue

flisk-sh/flisk-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。