问题解决总结
根本原因
Gateway 的 resolveControlUiRootSync 函数在自动查找控制 UI 目录时,没有包含 node_modules/openclaw/dist/control-ui 作为候选路径。手动指定相对路径时,可能因为工作目录解析问题无法正确找到目录。
最终解决方案
-
将控制 UI 文件从
node_modules/openclaw/dist/control-ui复制到项目根目录(例如:<project_root>/control-ui)。 注意:建立英文且无特殊符号的目录,"-"和"_"可能会引起混淆。 -
在配置文件中使用绝对路径指定
controlUi.root。 编辑openclaw.json:{ "controlUi": { "enabled": true, "root": "<absolute_path_to_control_ui>", "allowInsecureAuth": true, "dangerouslyDisableDeviceAuth": true } }

