Skip to content

[Bug]: Windows linked source install can skip Control UI auto-build through junction-launched scripts/ui.js #73059

@LouisGameDev

Description

@LouisGameDev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On Windows source installs linked through the global npm junction, the first-start Control UI auto-build can report success without building anything because scripts/ui.js does not run main() when launched through the junction path.

Steps to reproduce

  1. On Windows, clone openclaw/openclaw.
  2. Run pnpm install.
  3. Run pnpm build.
  4. Run pnpm link --global.
  5. Delete dist/control-ui.
  6. Run
    ode %APPDATA%\npm\node_modules\openclaw\scripts\ui.js build (or start the gateway so it auto-builds Control UI on first run).
  7. Observe that there is no Vite build output and dist/control-ui/index.html is still missing.

Expected behavior

The junction-launched script should execute the same build path as
ode .\scripts\ui.js build / pnpm ui:build and recreate dist/control-ui/index.html.

Actual behavior

The junction-launched script exits without Vite output and leaves dist/control-ui/index.html missing. On gateway startup, the log shows:

shell Control UI assets missing; building (ui:build, auto-installs UI deps)… Control UI build completed but C:\Users\hongl\AppData\Roaming\npm\node_modules\openclaw\dist\control-ui\index.html is still missing.

OpenClaw version

2026.4.25-beta.8

Operating system

Microsoft Windows 11 Pro 10.0.22631 (build 22631)

Install method

Source checkout with pnpm link --global; %APPDATA%\npm\node_modules\openclaw is a Windows directory junction to the repo root.

Model

NOT_APPLICABLE

Provider / routing chain

NOT_APPLICABLE

Additional provider/model setup details

This occurs before any model/provider request; it is in the local Control UI build wrapper.

Logs, screenshots, and evidence

`shell
Manual reproduction before the fix:

BEFORE_REPO=False
BEFORE_GLOBAL=False
node %APPDATA%\npm\node_modules\openclaw\scripts\ui.js build
AFTER_REPO=False
AFTER_GLOBAL=False
`

Repo-local control case on the same checkout:

`shell
node .\scripts\ui.js build

emits normal Vite build output

dist/control-ui/index.html exists afterward

`

Focused regression evidence from local investigation:

  • pnpm test test/scripts/ui.test.ts -t "executes main when launched through a junction path" failed before the fix with expected exit status 2 vs actual

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions