{"record":{"id":"07125b05a59cdf24","repo":"octobercms/october","slug":"unknown-label-label","errorCode":null,"errorMessage":"Unknown label ${label}","messagePattern":"Unknown label (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"modules/backend/vuecomponents/monacoeditor/assets/js/monacoeditor.js","lineNumber":39,"sourceCode":"                self.MonacoEnvironment = {\n                    baseUrl: '${baseUrl}/'\n                };\n                importScripts('${baseUrl}/vs/base/worker/workerMain.js');\n            `],\n            { type: 'text/javascript' }\n        )\n    );\n\n    // window.MonacoEnvironment = { getWorkerUrl: () => proxy };\n    window.MonacoEnvironment = {\n        getWorker: (moduleId, label) => {\n            switch (label) {\n                case 'yaml':\n                    return new Worker(new URL('monaco-yaml/yaml.worker.min.js', baseUrl));\n                case 'editorWorkerService':\n                    return new Worker(proxy);\n                default:\n                    throw new Error(`Unknown label ${label}`);\n            }\n        }\n    };\n}\n\nfunction initEditor(component, options) {\n    // Vue 3: Mark model references as raw to prevent Vue from making Monaco objects reactive\n    component.modelReferences = Vue.markRaw(component.modelDefinitions.map((def) => {\n        return def.makeModelReference(options);\n    }));\n\n    if (options.useEmmet && !emmetInitialized) {\n        emmetMonaco.emmetHTML(monaco, [\"html\", \"twig\", \"php\"]);\n        emmetMonaco.emmetCSS(monaco, [\"css\", \"less\", \"scss\"]);\n        emmetInitialized = true;\n    }\n\n    if (options.yamlSchemas && !yamlInitialized) {","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/vuecomponents/monacoeditor/assets/js/monacoeditor.js#L21-L57","documentation":"Worker-resolution failure in the Monaco editor's initEnvironment: Monaco requested a web worker with a label that the getWorker switch does not recognize (only known labels such as 'yaml' and 'editorWorkerService' are mapped). The editor backend cannot decide which worker script to load for that language/service.","triggerScenarios":"Thrown at modules/backend/vuecomponents/monacoeditor/assets/js/monacoeditor.js:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a language/editor service whose worker label is mapped in the switch","Extend the getWorker switch with a case (and worker bundle) for the missing label if that language is genuinely needed"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}