Skip to content

fix(infra): resolve control-ui assets on npm global install - #4909

Merged
gumadeiras merged 1 commit into
openclaw:mainfrom
YuriNachos:fix/4855-control-ui-assets-global-install
Jan 30, 2026
Merged

gumadeiras merged 1 commit into
openclaw:mainfrom
YuriNachos:fix/4855-control-ui-assets-global-install

Conversation

@YuriNachos

Copy link
Copy Markdown
Contributor

Summary

Fixes #4855

When OpenClaw is installed via npm install -g openclaw, the Control UI fails to load with "Missing Control UI assets" error, even though the assets are correctly included in the npm package.

Root Cause

resolveControlUiDistIndexPath() was too strict in its path resolution:

  • It only returned a path if the immediate parent directory was named exactly "dist"
  • For npm global installs, process.argv[1] points to openclaw.mjs at the package root, not inside dist/
  • This caused the function to return null even though dist/control-ui/index.html exists

Changes

Extended resolveControlUiDistIndexPath() with fallback strategies:

  1. Original behavior: Check if entrypoint is directly in dist/ directory
  2. npm .bin handling: When entry is in node_modules/.bin/, resolve the actual package location
  3. Package root walk: Walk up from entrypoint looking for package.json with dist/control-ui/ subdirectory

This follows the same pattern used in openclaw-root.ts for package resolution.

Test Plan

  • TypeScript compilation passes
  • All existing tests pass
  • Linter passes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 [email protected]

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jan 30, 2026
@gumadeiras gumadeiras self-assigned this Jan 30, 2026
gumadeiras added a commit that referenced this pull request Jan 30, 2026
@gumadeiras
gumadeiras merged commit aa3a8ea into openclaw:main Jan 30, 2026
22 of 24 checks passed
@gumadeiras

gumadeiras commented Jan 30, 2026 •

Copy link
Copy Markdown
Member

Merged via auto-merge (rebase).

  • Local gate for follow-up: pnpm lint && pnpm build && pnpm test

Thanks @YuriNachos!

let me know if you still have any problems

ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
ayushozha pushed a commit to ayushozha/openclaw that referenced this pull request Feb 1, 2026
YuriNachos added a commit to YuriNachos/clawdbot-fork that referenced this pull request Feb 1, 2026
YuriNachos added a commit to YuriNachos/clawdbot-fork that referenced this pull request Feb 1, 2026
mf-yang added a commit to mf-yang/openclaw-cn that referenced this pull request Feb 2, 2026
…#4909)

Support resolving control-ui assets when installed globally via npm.

Co-authored-by: YuriNachos
HashWarlock pushed a commit to HashWarlock/openclaw that referenced this pull request Feb 4, 2026
uxcu pushed a commit to uxcu/kook-openclaw that referenced this pull request Feb 5, 2026
bestNiu pushed a commit to bestNiu/clawdbot that referenced this pull request Feb 5, 2026
john-ver pushed a commit to apmcoin/apmclaw that referenced this pull request Mar 9, 2026
john-ver pushed a commit to apmcoin/apmclaw that referenced this pull request Mar 9, 2026
dustin-olenslager pushed a commit to dustin-olenslager/ironclaw-supreme that referenced this pull request Mar 24, 2026
dustin-olenslager pushed a commit to dustin-olenslager/ironclaw-supreme that referenced this pull request Mar 24, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
ogt-redknie pushed a commit to ogt-redknie/OPENX that referenced this pull request May 2, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
lhfer pushed a commit to lhfer/openclaw that referenced this pull request Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Control UI assets not found on npm global install (resolveControlUiDistIndexPath fails)

2 participants