openclaw - ✅(Solved) Fix Control UI blank screen: unresolved bare module import for markdown-it-task-lists [1 pull requests, 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#67680Fetched 2026-04-17 08:29:43
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
referenced ×4commented ×1cross-referenced ×1

Error Message

?token=...:1 Uncaught TypeError: Failed to resolve module specifier "markdown-it-task-lists". Relative references must start with either "/", "./", or "../".

Root Cause

The built JS bundle dist/control-ui/assets/index-Dlv1J1hX.js contains an unresolved bare ES module specifier:

import N from"markdown-it-task-lists"

Browsers cannot resolve bare module specifiers. The markdown-it-task-lists package is not present in node_modules and was not bundled inline by Vite. This causes an Uncaught TypeError: Failed to resolve module specifier which prevents the entire UI from loading.

Fix Action

Workaround

  1. Created a shim file at dist/control-ui/assets/markdown-it-task-lists.js with the full markdown-it-task-lists plugin implementation (sourced from the npm package on GitHub)
  2. Patched the import to use a relative path: import N from"./markdown-it-task-lists.js"
  3. UI loads and works correctly after this patch

PR fix notes

PR #67694: fix(ui): ensure markdown-it-task-lists is bundled by Vite [AI-assisted]

Description (problem / solution / changelog)

Summary

Fixes #67680 — Control UI renders a blank page because the Vite production bundle contains an unresolved bare module specifier for markdown-it-task-lists.

Root Cause

The markdown-it-task-lists package is declared in ui/package.json but the build pre-flight check in scripts/ui.js only validates vite and dompurify. If markdown-it-task-lists is not installed (e.g., incomplete pnpm install in CI), Vite cannot resolve the import and emits a bare specifier in the output bundle. Browsers cannot load bare specifiers, causing the entire UI to crash.

Fix

  1. scripts/ui.js: Add markdown-it-task-lists to the depsInstalled() pre-flight check. If the package is missing, pnpm install runs automatically before vite build.
  2. ui/vite.config.ts: Add markdown-it-task-lists to optimizeDeps.include for consistent pre-bundling.

Changed Files

  • scripts/ui.js — 1 line added (require.resolve('markdown-it-task-lists'))
  • ui/vite.config.tsoptimizeDeps.include extended

Testing

  • Verified require.resolve('markdown-it-task-lists') resolves correctly from ui/package.json
  • Existing ui/src/ui/markdown.test.ts covers task list rendering

Closes #67680

[!NOTE] This PR also contains the wizard guard fix from #67663 (shared base branch). GitHub will auto-deduplicate when either is merged first.


[!NOTE] This contribution was made with the assistance of AI tools (Antigravity).

Changed files

  • scripts/ui.js (modified, +1/-0)
  • ui/vite.config.ts (modified, +1/-1)

Code Example

import N from"markdown-it-task-lists"

---

?token=...:1 Uncaught TypeError: Failed to resolve module specifier "markdown-it-task-lists". Relative references must start with either "/", "./", or "../".
RAW_BUFFERClick to expand / collapse

Bug

After upgrading to OpenClaw 2026.4.14, the Control UI serves a blank page on all browsers (including localhost on the Pi, incognito windows, etc.).

Root Cause

The built JS bundle dist/control-ui/assets/index-Dlv1J1hX.js contains an unresolved bare ES module specifier:

import N from"markdown-it-task-lists"

Browsers cannot resolve bare module specifiers. The markdown-it-task-lists package is not present in node_modules and was not bundled inline by Vite. This causes an Uncaught TypeError: Failed to resolve module specifier which prevents the entire UI from loading.

Error in Browser Console

?token=...:1 Uncaught TypeError: Failed to resolve module specifier "markdown-it-task-lists". Relative references must start with either "/", "./", or "../".

After manually patching that import, a second error appeared because code calls md.core.ruler.after("github-task-lists", ...) which requires the plugin to register a core rule with that exact name.

Workaround

  1. Created a shim file at dist/control-ui/assets/markdown-it-task-lists.js with the full markdown-it-task-lists plugin implementation (sourced from the npm package on GitHub)
  2. Patched the import to use a relative path: import N from"./markdown-it-task-lists.js"
  3. UI loads and works correctly after this patch

Environment

  • OpenClaw: 2026.4.14
  • Platform: ARM64 (Raspberry Pi, Debian bookworm)
  • Node: 22.22.2
  • Access: both http://127.0.0.1:18789 and https://mcserver1.tail773f41.ts.net

Note

This patch lives in the dist directory and will be overwritten on the next update. A proper fix would ensure the Vite build bundles markdown-it-task-lists inline or provides it as a proper chunk with a relative import path.

extent analysis

TL;DR

The issue can be fixed by ensuring the markdown-it-task-lists package is properly bundled or imported in the Vite build process.

Guidance

  • Verify that the markdown-it-task-lists package is installed in the project by checking the node_modules directory and the package.json file.
  • Check the Vite configuration to see if there are any settings that prevent the markdown-it-task-lists package from being bundled inline or provided as a proper chunk.
  • Consider creating a custom Vite plugin to handle the import of markdown-it-task-lists and ensure it is properly resolved.
  • Review the markdown-it-task-lists documentation to ensure it is being used correctly and that the import statement is correct.

Example

No code example is provided as the issue is related to the build process and import resolution, and the fix will depend on the specific Vite configuration and project setup.

Notes

The current workaround of creating a shim file in the dist directory is not a permanent solution as it will be overwritten on the next update. A proper fix should be implemented to ensure the markdown-it-task-lists package is properly handled by the Vite build process.

Recommendation

Apply a workaround by creating a custom Vite plugin to handle the import of markdown-it-task-lists until a proper fix can be implemented. This will ensure the UI loads and works correctly while a more permanent solution is developed.

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