microsoft/vscode · error · Error

Unable to find node-pty binaries. Checked: ${candidatePaths.

Error message

Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}

What it means

Error "Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}" thrown in microsoft/vscode.

Source

Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/nodePtyShim.ts:78

	// (`node_modules.asar.unpacked`).
	const candidatePaths = APP_NODE_MODULES_ROOTS.flatMap(root => {
		const nodePtyRoot = path.join(vscodeAppRoot, root, 'node-pty');
		return [
			path.join(nodePtyRoot, 'build', 'Release'),
			path.join(nodePtyRoot, 'prebuilds', process.platform + '-' + process.arch),
		];
	});

	for (const candidatePath of candidatePaths) {
		if (await isDirectory(candidatePath)) {
			if (candidatePath !== candidatePaths[0]) {
				logService.info(`Using node-pty prebuilds from ${candidatePath}`);
			}
			return candidatePath;
		}
	}

	throw new Error(`Unable to find node-pty binaries. Checked: ${candidatePaths.join(', ')}`);
}

export async function copyNodePtyFiles(extensionPath: string, sourceNodePtyPath: string, logService: ILogService): Promise<void> {
	const nodePtyDir = path.join(extensionPath, 'node_modules', '@github', 'copilot', 'sdk', 'prebuilds', process.platform + '-' + process.arch);
	logService.info(`Creating node-pty shim: source=${sourceNodePtyPath}, dest=${nodePtyDir}`);

	try {
		await fs.mkdir(nodePtyDir, { recursive: true });
		const entries = await fs.readdir(sourceNodePtyPath);
		const uniqueEntries = [...new Set(entries)];
		logService.info(`Found ${uniqueEntries.length} entries to copy${uniqueEntries.length !== entries.length ? ` (${entries.length - uniqueEntries.length} duplicates ignored)` : ''}: ${uniqueEntries.join(', ')}`);

		await copyNodePtyWithRetries(sourceNodePtyPath, nodePtyDir, uniqueEntries, logService);
	} catch (error) {
		logService.error(`Failed to create node-pty shim (source dir: ${sourceNodePtyPath}, extension dir: ${nodePtyDir})`, error);
		throw error;
	}
}

View on GitHub (pinned to a94b963a32)

When it happens

Trigger: Thrown at extensions/copilot/src/extension/chatSessions/copilotcli/node/nodePtyShim.ts:78 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/c8cbbe7618d6c29b. Report an issue: GitHub.