microsoft/playwright · error · Error
Invalid installation targets: ${faultyArguments.map(name =>
Error message
Invalid installation targets: ${faultyArguments.map(name => `'${name}'`).join(', ')}. Expecting one of: ${this.suggestedBrowsersToInstall()} What it means
Thrown by resolveBrowsers when one or more aliases passed to 'playwright install <args...>' do not match any executable with an installable installType — findExecutable returned undefined or installType === 'none'. The message echoes the bad names and lists every valid target via suggestedBrowsersToInstall().
Source
Thrown at packages/playwright-core/src/server/registry/index.ts:1311
executables.push(this.findExecutable('ffmpeg')!);
};
for (const alias of aliases) {
if (alias === 'chromium' || chromiumAliases.includes(alias)) {
if (options.shell !== 'only')
handleArgument('chromium');
if (options.shell !== 'no')
handleArgument('chromium-headless-shell');
} else {
handleArgument(alias);
}
}
if (process.platform === 'win32')
executables.push(this.findExecutable('winldd')!);
if (faultyArguments.length)
throw new Error(`Invalid installation targets: ${faultyArguments.map(name => `'${name}'`).join(', ')}. Expecting one of: ${this.suggestedBrowsersToInstall()}`);
return [...new Set(executables)];
}
}
export function browserDirectoryToMarkerFilePath(browserDirectory: string): string {
return path.join(browserDirectory, 'INSTALLATION_COMPLETE');
}
export function buildPlaywrightCLICommand(sdkLanguage: string, parameters: string): string {
switch (sdkLanguage) {
case 'python':
return `playwright ${parameters}`;
case 'java':
return `mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="${parameters}"`;
case 'csharp':
return `pwsh bin/Debug/netX/playwright.ps1 ${parameters}`;
default: {
const packageManagerCommand = getPackageManagerExecCommand();View on GitHub (pinned to c8fc3bf8d3)
Solutions
- Read the 'Expecting one of:' list in the message and use one of those exact names.
- Fix the typo (common: 'chromuim' -> 'chromium').
- Run 'npx playwright install' with no arguments to install all defaults.
- If the name comes from config, validate it against registry.executables() before passing it.
Example fix
// before // shell: npx playwright install chromuim // after // shell: npx playwright install chromium
Defensive patterns
Strategy: validation
Validate before calling
import { registry } from 'playwright-core/lib/server/registry';
const requested = ['chromium', 'firefx']; // from CLI args
const valid = requested.filter(n => {
const e = registry.findExecutable(n);
return e && e.installType !== 'none';
});
const invalid = requested.filter(n => !valid.includes(n));
if (invalid.length)
throw new Error(`Unknown targets: ${invalid.join(', ')}. Valid: ${registry.suggestedBrowsersToInstall()}`); Type guard
function isValidInstallTarget(name: string): boolean {
const e = registry.findExecutable(name);
return !!e && e.installType !== 'none';
} Prevention
- Validate install target names against registry.suggestedBrowsersToInstall() before invoking install.
- Source browser names from the registry rather than hard-coding them.
- Add a lint/test asserting that any configured browser names resolve to installable executables.
When it happens
Trigger: Running 'npx playwright install foo' where 'foo' is not a known executable or is a detection-only entry; typo in a channel name; passing a browser name removed in the current Playwright version.
Common situations: Typo like 'chromuim'; using a channel alias not in chromiumAliases; referencing a browser that exists only in a different Playwright version; scripting install with a dynamic name that resolved to undefined.
Related errors
- ERROR: Playwright does not support installing ${executable.n
- Invalid viewport size format: use "width,height", for exampl
- Invalid geolocation format, should be "lat,long". For exampl
- PDF creation is only working with Chromium
- Device descriptor not found: '${options.device}', available
AI-assisted analysis of microsoft/playwright@c8fc3bf8d3 (2026-08-12).
Data as JSON: /api/errors/3b3f8d4501d88644.
Report an issue: GitHub.