{"record":{"id":"c620f6faf4800e23","repo":"windmill-labs/windmill","slug":"unimplemented-worker-label-moduleid","errorCode":null,"errorMessage":"Unimplemented worker ${label} (${moduleId})","messagePattern":"Unimplemented worker (.+?) \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/vscode.ts","lineNumber":120,"sourceCode":"\t\t\t\t\t\timport.meta.url\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'module'\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\t\t\t// graphql: () => {\n\t\t\t// \tconsole.log('Creating graphql worker')\n\t\t\t// \treturn new Worker(new URL(`../monaco_workers/graphql.worker.bundle.js`, import.meta.url), {\n\t\t\t// \t\tname: 'graphql'\n\t\t\t// \t})\n\t\t\t// }\n\t\t}\n\t\tconst workerFunc = workerLoaders[selector]\n\t\tif (workerFunc !== undefined) {\n\t\t\treturn workerFunc()\n\t\t} else {\n\t\t\tthrow new Error(`Unimplemented worker ${label} (${moduleId})`)\n\t\t}\n\t}\n\tenvEnhanced.getWorker = getWorker\n}\n\nexport async function initializeVscode(caller?: string, htmlContainer?: HTMLElement) {\n\tif (!isInitialized && !isInitializing) {\n\t\tconsole.log(`Initializing vscode-api from ${caller ?? 'unknown'}`)\n\t\tisInitializing = true\n\n\t\ttry {\n\t\t\t// init vscode-api\n\t\t\tconst apiWrapper = new MonacoVscodeApiWrapper({\n\t\t\t\t$type: 'classic',\n\t\t\t\tviewsConfig: {\n\t\t\t\t\t$type: 'EditorService'\n\t\t\t\t},\n","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/vscode.ts#L102-L138","documentation":"During Monaco/vscode API initialization, the editor asks for a web worker per language via getWorker(label, moduleId). The workerLoaders map only registers editors, typescript, json, html and css; if Monaco requests any other language worker (or a selector that no longer matches a loader), this error is thrown because there is no loader implemented for it.","triggerScenarios":"Monaco's monaco-editor-core getWorker fallback is invoked with a language selector not present in workerLoaders — e.g. a 'graphql' worker (the loader is commented out in vscode.ts), or a plugin requesting an unregistered language worker during initializeVscode.","commonSituations":"Enabling a Monaco language extension (like GraphQL) whose worker loader was removed/commented out; a Monaco version upgrade introducing a new built-in worker selector; a misconfigured language feature plugin passing an unexpected moduleId.","solutions":["Only use editor languages whose workers are registered (editor, typescript, json, html, css), or add a loader entry for the requested language in workerLoaders","If graphql (or another language) is needed, re-add/restore its worker loader in frontend/src/lib/components/vscode.ts","Check the moduleId in the message to identify which feature requested the worker and disable that Monaco plugin/extension","Verify the @codingame/monaco-vscode-* package versions match the monaco-editor-core version in use"],"exampleFix":"// before\n// graphql: () => {\n//   return new Worker(new URL(`../monaco_workers/graphql.worker.bundle.js`, import.meta.url), { name: 'graphql' })\n// }\n// after\ngraphql: () => new Worker(new URL('../monaco_workers/graphql.worker.bundle.js', import.meta.url), { type: 'module', name: 'graphql' })","handlingStrategy":"validation","validationCode":"const supported = ['editor','typescript','json','html','css']\nif (!supported.includes(label)) console.warn(`No worker loader for '${label}' — Monaco feature may fail`)","typeGuard":"function hasWorkerLoader(selector: string): selector is keyof typeof workerLoaders {\n  return selector in workerLoaders\n}","tryCatchPattern":null,"preventionTips":["Keep workerLoaders in sync with every Monaco language feature actually enabled","After upgrading monaco-editor-core/@codingame packages, smoke-test editor startup in all editor surfaces","Wrap getWorker calls in try/catch when a language is optional so the editor degrades gracefully"],"tags":["monaco","web-worker","frontend"],"backgroundTag":"unimplemented-worker-selector","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}