Skip to content

Fix CodeMirror "multiple instances of @codemirror/state" crash on page navigation#2969

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-web-page-errors
Draft

Fix CodeMirror "multiple instances of @codemirror/state" crash on page navigation#2969
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-web-page-errors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 13, 2026

Pages were crashing with Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks. — a symptom of two different versions of @codemirror/state being bundled simultaneously.

Root cause

@codemirror/search@6.6.0 introduced a transitive chain pulling in newer versions alongside the ones declared directly:

@codemirror/search@6.6.0 → @codemirror/view@6.39.16 → @codemirror/state@6.5.4

while the project and @uiw/react-codemirror were wired to @codemirror/view@6.35.0 / @codemirror/state@6.4.1. Webpack bundled both, breaking CodeMirror's instanceof checks at runtime.

Changes

  • package.json — Added pnpm overrides to pin a single version of the conflicting packages across the entire dependency tree; updated direct devDependency specifiers to exact versions for consistency:
    "overrides": {
      "@codemirror/state": "6.5.4",
      "@codemirror/view": "6.39.16"
    }
  • pnpm-lock.yaml — Regenerated; now resolves exactly one version of each (@codemirror/state@6.5.4, @codemirror/view@6.39.16) across all packages.
Original prompt

This section details on the original issue you should resolve

<issue_title>最新开发版web页面还是有报错</issue_title>
<issue_description>### Qinglong version

2.20.2 3月11日镜像

Steps to reproduce

安装在x86群晖7.2.2 docker最近几个青龙版本都有这个问题,web页面丢失,点不同功能显示

Image Image 刷新可以恢复一下,过一会就出现

What is expected?

待修复

What is actually happening?

待修复

System Info

Any additional comments?

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
qinglong Ready Ready Preview, Comment Mar 13, 2026 2:06pm
qinglong-back Ready Ready Preview, Comment Mar 13, 2026 2:06pm

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix web page errors in latest Qinglong version Fix CodeMirror "multiple instances of @codemirror/state" crash on page navigation Mar 13, 2026
Copilot AI requested a review from whyour March 13, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

最新开发版web页面还是有报错

2 participants