Bug description
After running the installer (bash scripts/setup.sh), the step command fails immediately with:
step-cli error: OpenTUI runtime did not export createLocalTuiClientApp()
Environment
- step-realtime-cli version:
1.0.0
- Node version:
v22.14.0
- OS: Linux (Ubuntu / WSL)
- Package manager:
pnpm 10.17.0
Reproduction steps
git clone https://github.com/stepfun-ai/Step-Realtime-CLI.git
cd Step-Realtime-CLI
bash scripts/setup.sh
- Open a new shell (so
~/.step-cli/bin is on PATH)
step
Expected behavior
The interactive TUI starts.
Actual behavior
The process exits immediately with:
step-cli error: OpenTUI runtime did not export createLocalTuiClientApp()
Root cause analysis
The bundle produced by tsdown / rolldown 1.0.0-beta.7 splits src/runtime/local-tui-app.ts into a dynamic chunk (dist/local-tui-app-<hash>.js). However, that chunk is effectively empty (only 3 lines of imports) and does not contain the createLocalTuiClientApp export or the LocalStepCliTuiApp class.
grep shows the symbol is referenced in dist/index.js but never defined in any built chunk:
$ grep -rl 'createLocalTuiClientApp' dist/
dist/index.js
dist/index.cjs
$ cat dist/local-tui-app-dRVjt31N.js
import "./local-session-target-DAN8-Cwd.js";
import "./local-tui-bootstrap-xGRRjkP0.js";
import process from "node:process";
The LocalStepCliTuiApp class is missing from the chunk entirely, so the runtime guard
if (typeof runtimeModule.createLocalTuiClientApp !== 'function') {
throw new Error('OpenTUI runtime did not export createLocalTuiClientApp()');
}
fails at runtime.
Workaround
Running the entrypoint directly via tsx bypasses the bundled artifacts and starts the TUI correctly:
rm -rf dist
node bin/step-cli.js
# → falls back to: running src/index.ts via tsx
Impact
This breaks the default installation path for any user whose launcher resolves to the bundled dist/index.js.
Related files
src/runtime/local-tui-app.ts
src/runtime/open-tui-capability.ts
tsdown.config.ts
Bug description
After running the installer (
bash scripts/setup.sh), thestepcommand fails immediately with:Environment
1.0.0v22.14.0pnpm 10.17.0Reproduction steps
git clone https://github.com/stepfun-ai/Step-Realtime-CLI.gitcd Step-Realtime-CLIbash scripts/setup.sh~/.step-cli/binis onPATH)stepExpected behavior
The interactive TUI starts.
Actual behavior
The process exits immediately with:
Root cause analysis
The bundle produced by
tsdown/rolldown 1.0.0-beta.7splitssrc/runtime/local-tui-app.tsinto a dynamic chunk (dist/local-tui-app-<hash>.js). However, that chunk is effectively empty (only 3 lines of imports) and does not contain thecreateLocalTuiClientAppexport or theLocalStepCliTuiAppclass.grepshows the symbol is referenced indist/index.jsbut never defined in any built chunk:The
LocalStepCliTuiAppclass is missing from the chunk entirely, so the runtime guardfails at runtime.
Workaround
Running the entrypoint directly via
tsxbypasses the bundled artifacts and starts the TUI correctly:rm -rf dist node bin/step-cli.js # → falls back to: running src/index.ts via tsxImpact
This breaks the default installation path for any user whose launcher resolves to the bundled
dist/index.js.Related files
src/runtime/local-tui-app.tssrc/runtime/open-tui-capability.tstsdown.config.ts