Build fails with monaco-editor >= 0.56: monaco-editor/esm/vs/editor/editor.api no longer resolves

未關閉
#231 1 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

@liuxy0551 已經在處理了。

開始於 2026年10月28日。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
67/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript, vite
領域
frontend

研究方向

Start with esm/fillers/monaco-editor-core.js and its .d.ts, then check the *.worker.js imports and how the package declares its monaco-editor peer range. Reproduce with monaco-editor 0.57.0 using Vite 8 and TypeScript with moduleResolution: bundler; determine a resolution approach that accounts for versions before 0.56. Done when the imports resolve and Monaco types remain intact across the supported peer range.

由索引模型根據 Issue 內容生成。

描述

Since 0.56, monaco-editor declares exports with "./*": "./esm/vs/*.js", so the filler's export * from 'monaco-editor/esm/vs/editor/editor.api' (esm/fillers/monaco-editor-core.js and .d.ts) resolves to esm/vs/esm/vs/editor/editor.api.js, which does not exist.

  • Vite 8 (Rolldown): Rolldown failed to resolve import "monaco-editor/esm/vs/editor/editor.api" from ".../monaco-sql-languages/esm/fillers/monaco-editor-core.js".
  • TypeScript (moduleResolution: bundler): the module is not resolved, so with skipLibCheck every Monaco type re-exported by the package silently becomes any.
  • The *.worker.js files import monaco-editor/esm/vs/editor/editor.worker.js, broken the same way.

Reproduced with monaco-sql-languages 1.2.0 and 1.2.1 (same filler on main) and monaco-editor 0.57.0. Pointing the filler at monaco-editor/editor/editor.api fixes it on >= 0.56, but that path does not exist before 0.56, so it would mean raising the monaco-editor peer range, or importing from monaco-editor itself.

主要語言
TypeScript
星號
295
分支
51
平均合併
7 天 17 小時
30 天內合併 PR
3

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

DTStack/monaco-sql-languages 的其他 Issue

查看 DTStack/monaco-sql-languages 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。