windmill-labs/windmill · error

Unimplemented worker ${label} (${moduleId})

Error message

Unimplemented worker ${label} (${moduleId})

What it means

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.

Source

Thrown at frontend/src/lib/components/vscode.ts:120

						import.meta.url
					),
					{
						type: 'module'
					}
				)
			}
			// graphql: () => {
			// 	console.log('Creating graphql worker')
			// 	return new Worker(new URL(`../monaco_workers/graphql.worker.bundle.js`, import.meta.url), {
			// 		name: 'graphql'
			// 	})
			// }
		}
		const workerFunc = workerLoaders[selector]
		if (workerFunc !== undefined) {
			return workerFunc()
		} else {
			throw new Error(`Unimplemented worker ${label} (${moduleId})`)
		}
	}
	envEnhanced.getWorker = getWorker
}

export async function initializeVscode(caller?: string, htmlContainer?: HTMLElement) {
	if (!isInitialized && !isInitializing) {
		console.log(`Initializing vscode-api from ${caller ?? 'unknown'}`)
		isInitializing = true

		try {
			// init vscode-api
			const apiWrapper = new MonacoVscodeApiWrapper({
				$type: 'classic',
				viewsConfig: {
					$type: 'EditorService'
				},

View on GitHub (pinned to e474e8803c)

Solutions

  1. Only use editor languages whose workers are registered (editor, typescript, json, html, css), or add a loader entry for the requested language in workerLoaders
  2. If graphql (or another language) is needed, re-add/restore its worker loader in frontend/src/lib/components/vscode.ts
  3. Check the moduleId in the message to identify which feature requested the worker and disable that Monaco plugin/extension
  4. Verify the @codingame/monaco-vscode-* package versions match the monaco-editor-core version in use

Example fix

// before
// graphql: () => {
//   return new Worker(new URL(`../monaco_workers/graphql.worker.bundle.js`, import.meta.url), { name: 'graphql' })
// }
// after
graphql: () => new Worker(new URL('../monaco_workers/graphql.worker.bundle.js', import.meta.url), { type: 'module', name: 'graphql' })
Defensive patterns

Strategy: validation

Validate before calling

const supported = ['editor','typescript','json','html','css']
if (!supported.includes(label)) console.warn(`No worker loader for '${label}' — Monaco feature may fail`)

Type guard

function hasWorkerLoader(selector: string): selector is keyof typeof workerLoaders {
  return selector in workerLoaders
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/c620f6faf4800e23. Report an issue: GitHub.