Skip to content

runtime: OpenTUI dependencies fail on standard Node.js after build fix #29

Description

@li-xiu-qi

Problem

After applying the build fix from #28 (which resolves the missing createLocalTuiClientApp export), step still cannot start the TUI on a standard Node.js runtime. Two separate upstream-related errors appear depending on how the entrypoint is run.

Environment

  • step-realtime-cli version: 1.0.0
  • Node version: v22.14.0
  • OS: Linux (Ubuntu / WSL)
  • Package manager: pnpm 10.17.0
  • OpenTUI packages: @opentui/core@0.1.90, @opentui/react@0.1.90

Error 1: built dist path

When dist/ is present and bin/step-cli.js resolves to dist/index.js:

$ step
step-cli error: Cannot find module 'react-reconciler/constants' imported from .../@opentui/react/chunk-tq1yd1rw.js
Did you mean to import "react-reconciler/constants.js"?

Root cause: @opentui/react (ESM package) imports from react-reconciler/constants without the .js extension. Node.js's ESM loader cannot resolve the subpath without an explicit extension because react-reconciler does not expose a conditional exports map for /constants.

Error 2: tsx source path

When dist/ is removed and bin/step-cli.js falls back to tsx src/index.ts:

$ rm -rf dist && node bin/step-cli.js
step-cli error: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. Received protocol 'bun:'

Root cause: @opentui/core@0.1.90 depends on bun-webgpu@0.1.5, which contains unconditional bun: protocol imports. On standard Node.js (not Bun) these imports cannot be resolved. The bun-webgpu package is pulled in as a transitive production dependency:

@opentui/core 0.1.90
└── bun-webgpu 0.1.5

Impact

With the current dependency versions, the interactive TUI cannot be launched on a stock Node.js installation. This blocks the default bash scripts/setup.shstep workflow for users who are not running Bun.

Mitigation

  • fix(setup): prefer Linux-native Bun on WSL and respect STEP_BUN_BIN #37 updates scripts/setup.sh to prefer a Linux-native Bun and install the Bun-compiled native binary. When that PR is merged, the default installer path on WSL will produce a working launcher as long as a Linux Bun is available.
  • Until the upstream OpenTUI packages are made Node-compatible, TUI mode should be considered Bun-only.

Related

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