DTStack / DTStack/monaco-sql-languages
报错 Uncaught Error: [createInstance] N depends on UNKNOWN service treeViewsDndService.
- 主要语言
- TypeScript
- 星标
- 295
- 派生
- 50
- 平均合并
- 1 小时 21 分钟
- 30 天内合并 PR
- 1
描述
## 问题
应用层进行以下操作报错(包括但不仅限于):
- 不同编辑器切换
- 打开一个新的编辑器
- 点击自定义的右键菜单
## 报错信息
`Uncaught Error: [createInstance] N depends on UNKNOWN service treeViewsDndService.
Error: [createInstance] N depends on UNKNOWN service treeViewsDndService.
at g._throwIfStrict (34624.54f3c2ebae0fa0172889.js:1:12559)
at g._createInstance (34624.54f3c2ebae0fa0172889.js:1:8878)
at g.createInstance (34624.54f3c2ebae0fa0172889.js:1:8667)
at f._instantiateById (79216.7bcdc210d90bec076060.js:1:21952)
at f._instantiateSome (79216.7bcdc210d90bec076060.js:1:21562)
at 79216.7bcdc210d90bec076060.js:1:20786
at g._throwIfStrict (34624.54f3c2ebae0fa0172889.js:1:12559)
at g._createInstance (34624.54f3c2ebae0fa0172889.js:1:8878)
at g.createInstance (34624.54f3c2ebae0fa0172889.js:1:8667)
at f._instantiateById (79216.7bcdc210d90bec076060.js:1:21952)
at f._instantiateSome (79216.7bcdc210d90bec076060.js:1:21562)
at 79216.7bcdc210d90bec076060.js:1:20786
at 34928.208a93e8d793d25272b0.js:1:14036`
内置json报错
```
34009.44c689272f43f9f349ca.js:2 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'schemas')
at Object.configure (json.worker.js:2:837561)
at new (json.worker.js:2:839387)
at Ke._foreignModuleFactory (json.worker.js:2:838777)
at Ke.$loadForeignModule (json.worker.js:2:341251)
at L._handleMessage (json.worker.js:2:198986)
at Object.handleMessage (json.worker.js:2:198507)
at v._handleRequestMessage (json.worker.js:2:195400)
at v._handleMessage (json.worker.js:2:194841)
at v.handleMessage (json.worker.js:2:194413)
at L.onmessage (json.worker.js:2:198605)
```
## 原因分析
从报错可以看出,是`monaco-editor` 在版本 0.52.2 中缺少 `treeViewsDndService` 服务依赖导致的。而这类服务只存在于 VS Code workbench 环境,不属于 Monaco standalone 环境。
## 解法
目前将找到的方法都进行了尝试,暂时还没办法解决。
贡献指南
这个仓库没有索引到贡献指南
调研方向
首先使用 monaco-editor 0.52.2 在 issue 中列出的应用层操作中重现错误,然后检查缺失的 treeViewsDndService 依赖项周围的集成代码以及 JSON worker 错误。完成的标准是,切换编辑器、打开编辑器和自定义上下文菜单不再产生这些错误。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100