openclaw - 💡(How to fix) Fix [Bug]: WhatsApp QR fails to render on 2026.4.29 — `qrcode` missing from 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#75804Fetched 2026-05-02 05:29:47
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

On openclaw 2026.4.29 (installed via npm install -g [email protected]), opening the WhatsApp pairing QR in the Control UI fails with:

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
/home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

The bundled file dist/qr-terminal-DI6mj_pL.js does import "qrcode" but qrcode is not declared in the plugin-runtime-deps package.json#dependencies, so the runtime staging step never installs it.

Verified by inspecting /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/package.json — declared deps include ajv, chokidar, @whiskeysockets/baileys, @discordjs/voice, etc., but qrcode is absent.

Same class of bug as #75685 (Discord/Telegram missing deps), #75623 (json5 missing in slack/telegram), #75733 (grammy warning despite staging) — dist/qr-terminal-*.js is another file that slipped through the deps-list scan when bundling 2026.4.29.

Error Message

  1. WebUI surfaces the import error; dist/qr-terminal-DI6mj_pL.js throws at the import "qrcode" line.

Root Cause

On openclaw 2026.4.29 (installed via npm install -g [email protected]), opening the WhatsApp pairing QR in the Control UI fails with:

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
/home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

The bundled file dist/qr-terminal-DI6mj_pL.js does import "qrcode" but qrcode is not declared in the plugin-runtime-deps package.json#dependencies, so the runtime staging step never installs it.

Verified by inspecting /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/package.json — declared deps include ajv, chokidar, @whiskeysockets/baileys, @discordjs/voice, etc., but qrcode is absent.

Same class of bug as #75685 (Discord/Telegram missing deps), #75623 (json5 missing in slack/telegram), #75733 (grammy warning despite staging) — dist/qr-terminal-*.js is another file that slipped through the deps-list scan when bundling 2026.4.29.

Fix Action

Workaround

cd /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-*/
sudo -u openclaw -H npm install qrcode --no-save --prefer-offline
systemctl restart openclaw-gateway

(Verified on AWS Lightsail Ubuntu 22.04 — QR renders correctly after this.)

Code Example

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
/home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

---

cd /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-*/
sudo -u openclaw -H npm install qrcode --no-save --prefer-offline
systemctl restart openclaw-gateway
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (channel pairing flow blocked, no crash)

Summary

On openclaw 2026.4.29 (installed via npm install -g [email protected]), opening the WhatsApp pairing QR in the Control UI fails with:

Failed to render the WhatsApp QR: Cannot find package 'qrcode' imported from
/home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/dist/qr-terminal-DI6mj_pL.js
Did you mean to import "qrcode/lib/index.js"?

The bundled file dist/qr-terminal-DI6mj_pL.js does import "qrcode" but qrcode is not declared in the plugin-runtime-deps package.json#dependencies, so the runtime staging step never installs it.

Verified by inspecting /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80/package.json — declared deps include ajv, chokidar, @whiskeysockets/baileys, @discordjs/voice, etc., but qrcode is absent.

Same class of bug as #75685 (Discord/Telegram missing deps), #75623 (json5 missing in slack/telegram), #75733 (grammy warning despite staging) — dist/qr-terminal-*.js is another file that slipped through the deps-list scan when bundling 2026.4.29.

Steps to reproduce

  1. npm install -g [email protected] on a fresh box
  2. Start gateway, open Control UI
  3. Channels → WhatsApp → Pair (or any flow that calls qr-terminal)
  4. WebUI surfaces the import error; dist/qr-terminal-DI6mj_pL.js throws at the import "qrcode" line.

Workaround

cd /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-*/
sudo -u openclaw -H npm install qrcode --no-save --prefer-offline
systemctl restart openclaw-gateway

(Verified on AWS Lightsail Ubuntu 22.04 — QR renders correctly after this.)

Suggested fix

Add qrcode to whichever package.json template generates the plugin-runtime-deps bundle. The dist scanner that builds the deps list should also pick up imports from dist/qr-terminal-*.js (and similar QR/feishu/weixin paths) so this class of bug stops recurring per release.

Environment

  • openclaw 2026.4.29 (npm)
  • Ubuntu 22.04 LTS, AWS Lightsail nano
  • Node 22 (NodeSource apt)

extent analysis

TL;DR

Add qrcode to the package.json template that generates the plugin-runtime-deps bundle to fix the WhatsApp QR pairing issue in openclaw 2026.4.29.

Guidance

  • Verify that qrcode is not listed in the package.json file under dependencies in the /home/openclaw/.openclaw/plugin-runtime-deps/openclaw-2026.4.29-9afbd6ad7d80 directory.
  • Apply the provided workaround by running npm install qrcode --no-save --prefer-offline in the plugin-runtime-deps directory and restarting the openclaw-gateway service to temporarily resolve the issue.
  • To prevent similar issues in the future, update the dist scanner to include imports from files like dist/qr-terminal-*.js when generating the deps list.
  • Review the package.json template that generates the plugin-runtime-deps bundle to ensure it includes all required dependencies, including qrcode.

Example

No code snippet is necessary for this issue, as the problem is with the missing dependency in the package.json file.

Notes

This fix assumes that the issue is solely due to the missing qrcode dependency in the package.json file. If other dependencies are missing, additional steps may be required.

Recommendation

Apply the workaround by installing qrcode and restarting the openclaw-gateway service, as this is a verified temporary solution. A permanent fix would involve updating the package.json template to include qrcode and ensuring the dist scanner picks up all required dependencies.

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 [Bug]: WhatsApp QR fails to render on 2026.4.29 — `qrcode` missing from plugin-runtime-deps [1 comments, 2 participants]