Skip to content

Browser plugin fails to load on 2026.4.27: missing ajv in plugin-runtime-deps #75056

@rsundin

Description

@rsundin

Summary

After upgrading from 2026.4.26 → 2026.4.27, the browser plugin (browser-control service) fails to start with ERR_MODULE_NOT_FOUND for ajv. Same class of bug as the chokidar issue in 2026.4.25 (fixed in 2026.4.26).

Repro

  1. Run openclaw update from 2026.4.26 → 2026.4.27
  2. Restart gateway
  3. Browser plugin fails to register

Logs

error plugins plugin service failed (browser-control, plugin=browser, root=/usr/lib/node_modules/openclaw/dist/extensions/browser):
  Cannot find package 'ajv' imported from /root/.openclaw/plugin-runtime-deps/openclaw-2026.4.27-4eca5026e977/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'ajv' imported from /root/.openclaw/plugin-runtime-deps/openclaw-2026.4.27-4eca5026e977/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
Did you mean to import "ajv/dist/ajv.js"?

Root cause

@modelcontextprotocol/sdk@1.29.0 ships dist/esm/validation/ajv-provider.js which does import Ajv from 'ajv', but ajv is not declared in:

  • plugin-runtime-deps/openclaw-2026.4.27-*/.openclaw-runtime-deps.json (specs list)
  • dist/extensions/browser/package.json (only lists @modelcontextprotocol/sdk directly)

MCP SDK appears to treat ajv as a peer/optional dep that the runtime-deps installer doesn't materialize on its own. The plugin loader can't resolve it via the parent OpenClaw node_modules either.

Workaround

cd /root/.openclaw/plugin-runtime-deps/openclaw-2026.4.27-*/
npm install --no-save ajv
openclaw gateway restart

After this the browser plugin loads cleanly:

info browser/server Browser control listening on http://127.0.0.1:18791/ (auth=token)

Suggested fix

Add ajv (and audit any other peer/optional deps of @modelcontextprotocol/sdk that ESM resolution requires) to the runtime-deps specs in plugin-runtime-deps/openclaw-<ver>/.openclaw-runtime-deps.json, the same way chokidar was added in 2026.4.26.

Environment

  • OpenClaw: 2026.4.27 (cbc2ba0)
  • Previous version: 2026.4.26 (clean)
  • Node: v22.22.2
  • OS: Linux 6.8.12-20-pve (LXC container on Proxmox), x64
  • 2 cores, 4 GB RAM

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