microsoft/vscode · error

Unrecognized language: ${languageId}

Error message

Unrecognized language: ${languageId}

What it means

Error "Unrecognized language: ${languageId}" thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/completions-core/vscode-node/prompt/src/parse.ts:53

	cpp: WASMLanguage.Cpp,
};

export function isSupportedLanguageId(languageId: string): boolean {
	// Temporarily disable C# support until the tree-sitter parser for it is
	// fully spec-ed.
	return (
		languageId in languageIdToWasmLanguageMapping &&
		languageId !== 'csharp' &&
		languageId !== 'java' &&
		languageId !== 'php' &&
		languageId !== 'c' &&
		languageId !== 'cpp'
	);
}

export function languageIdToWasmLanguage(languageId: string): WASMLanguage {
	if (!(languageId in languageIdToWasmLanguageMapping)) {
		throw new Error(`Unrecognized language: ${languageId}`);
	}
	return languageIdToWasmLanguageMapping[languageId];
}

const languageLoadPromises = new Map<WASMLanguage, Promise<Parser.Language>>();

async function loadWasmLanguage(language: WASMLanguage): Promise<Parser.Language> {
	// construct a path that works both for the TypeScript source, which lives under `/src`, and for
	// the transpiled JavaScript, which lives under `/dist`
	let wasmBytes;
	try {
		wasmBytes = await readFile(`tree-sitter-${language}.wasm`);
	} catch (e: unknown) {
		if (e instanceof Error && 'code' in e && typeof e.code === 'string' && e.name === 'Error') {
			throw new CopilotPromptLoadFailure(`Could not load tree-sitter-${language}.wasm`, e);
		}
		throw e;
	}

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/completions-core/vscode-node/prompt/src/parse.ts:53 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of microsoft/vscode@a94b963a32 (2026-08-12). Data as JSON: /api/errors/f60660f1c11e6379. Report an issue: GitHub.