openclaw - 💡(How to fix) Fix Browser plugin fails to load on 2026.4.27: missing `ajv` in plugin-runtime-deps [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75056Fetched 2026-05-01 05:38:38
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

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).

Error Message

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/[email protected] 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.

Fix Action

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)

Code Example

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"?

---

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

---

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

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/[email protected] 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

extent analysis

TL;DR

The most likely fix is to add ajv to the runtime-deps specs in .openclaw-runtime-deps.json to resolve the ERR_MODULE_NOT_FOUND error.

Guidance

  • Verify that ajv is not already included in the plugin-runtime-deps specs by checking the .openclaw-runtime-deps.json file.
  • Apply the suggested workaround by running npm install --no-save ajv in the plugin-runtime-deps directory to temporarily resolve the issue.
  • Check for other peer/optional dependencies of @modelcontextprotocol/sdk that may require similar treatment.
  • Consider auditing the dependency management process to prevent similar issues in the future.

Example

No code snippet is necessary in this case, as the issue is related to dependency management rather than code implementation.

Notes

The provided workaround is specific to the 2026.4.27 version of OpenClaw, and it is unclear whether this issue affects other versions. Additionally, the root cause of the issue is related to the treatment of ajv as a peer/optional dependency by the MCP SDK.

Recommendation

Apply the workaround by running npm install --no-save ajv in the plugin-runtime-deps directory, as this provides a temporary resolution to the issue. A more permanent fix would involve adding ajv to the runtime-deps specs, but this may require further investigation and testing.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Browser plugin fails to load on 2026.4.27: missing `ajv` in plugin-runtime-deps [1 comments, 2 participants]