Skip to content

升级版本后配置文件中的插件路径未更新,导致 gateway 启动失败 #58626

@solink7

Description

@solink7

问题描述

每次升级 openclaw 版本后,运行 openclaw gateway start 会失败,报错:

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - plugins.load.paths: plugin: plugin path not found: /Users/link/Library/pnpm/global/5/.pnpm/openclaw@2026.3.28_@napi-rs+canvas@0.1.97/node_modules/openclaw/dist/extensions/acpx

根本原因

  1. 配置文件 (~/.openclaw/openclaw.json) 中存储了带版本号的绝对路径:

    "plugins": {
      "load": {
        "paths": ["/Users/.../openclaw@2026.3.28_@napi-rs+canvas@0.1.97/.../acpx"]
      },
      "installs": {
        "acpx": {
          "sourcePath": "/Users/.../openclaw@2026.3.28_@napi-rs+canvas@0.1.97/.../acpx",
          "installPath": "/Users/.../openclaw@2026.3.28_@napi-rs+canvas@0.1.97/.../acpx"
        }
      }
    }
  2. pnpm 升级时会删除旧版本目录,只保留新版本

  3. 升级后,配置文件中的路径指向已不存在的旧版本目录

  4. openclaw doctor --fix 没有检测或修复这个路径问题

期望行为

  • 方案 A:升级时自动更新配置文件中的版本相关路径
  • 方案 B:doctor --fix 能检测并修复过期的路径
  • 方案 C:使用相对路径或版本无关的路径设计(如符号链接)

当前解决方案

手动修改配置文件,将旧版本号替换为新版本号。

环境信息

  • openclaw 版本:2026.3.31(从 2026.3.28 升级)
  • 安装方式:pnpm global
  • 操作系统:macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    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