Skip to content

[bug] Windows: step fails with "Unknown file extension .scm" — OpenTUI requires Bun runtime #78

Description

@knqiufan

step-realtime-cli 版本

1.0.0 (built from main at ee6862f)

Node 版本 & OS

Node v22.14.0 / Windows 11 10.0.26200

复现步骤

  1. On Windows 11, clone stepfun-ai/Step-Realtime-CLI and checkout main.
  2. Run powershell -ExecutionPolicy Bypass -File scripts/setup.ps1 (full install completes; smoke test step --version returns 1.0.0).
  3. Open a new PowerShell window (so PATH updates take effect).
  4. Run step (no arguments).

期望行为

step launches the interactive TUI (or, if TUI cannot start, an actionable error or fallback REPL).

实际行为

step-cli error: Unknown file extension ".scm" for C:\Users\<user>\.step-cli\bin\node_modules\@opentui\core\assets\javascript\highlights.scm

Process exits non-zero. The CLI is unusable in TUI mode on Windows.

日志 / 堆栈

Root cause analysis (from inspecting the installed bundle):

node_modules/@opentui/core/index-e89anq5x.js contains:

  • 11 import ... from "./assets/...highlights.scm" with { type: "file" } statements (tree-sitter highlight queries)
  • 6 similar with { type: "file" } imports for .wasm files (tree-sitter grammars)
  • 4 top-level import { ... } from "bun:ffi" statements (real FFI bindings)
  • Transitive bun-webgpu@0.1.5 declared in @opentui/core's package.json

with { type: "file" } is a Bun-specific import attribute; Node.js's strict ESM loader rejects the unknown extension. Even with a custom loader hook for .scm/.wasm, the bun:ffi top-level imports would throw next and there is no way to fake FFI calls via a loader hook.

The Windows installer (scripts/setup.ps1, from #12) deliberately generates a step.cmd launcher backed by node bin/step-cli.js (README.md:69: "On Windows, the installer registers a step.cmd launcher backed by Node.js, so Bun native compilation is not required"). This is the root cause: the installer treats Windows as Node-only, but OpenTUI is Bun-only.

Related

自检

  • 我已搜索 existing issues,确认这不是重复问题
  • 我已阅读 CONTRIBUTING.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions