首页 新闻 会员 周边 捐助

升级到 angular 19 后 monaco-editor 报错:"Failed to execute 'fetch' on 'WorkerGlobalScope'"

0
[待解决问题]

项目升级到 angular 19 后访问时浏览器控制台出现 monaco-editor 的报错

TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from /assets/monaco/min/vs/language/html/htmlWorker.js
    at A.load (workerMain.js:6:13847)
    at n.load (workerMain.js:6:11936)
    at r (workerMain.js:8:9341)
    at f._loadModule (workerMain.js:8:9469)
    at f._resolve (workerMain.js:9:452)
    at f.defineModule (workerMain.js:8:5564)
    at f._relativeRequire (workerMain.js:8:6188)
    at a (workerMain.js:8:8519)
    at workerMain.js:29:82407
    at new Promise (<anonymous>)
    at editor.main.js:9:12

请问如何解决这个问题?

monaco-editor 版本是 0.52.0,ngx-monaco-editor-v2 版本是 18.1.0

问题补充:

升级到 ngx-monaco-editor-v2 19.0.2 与 monaco-editor 0.52.2 问题依旧

dudu的主页 dudu | 高人七级 | 园豆:29642
提问于:2024-12-21 18:43

github 上的相关 issue https://github.com/microsoft/monaco-editor/issues/4778

dudu 6小时前
<
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册