fix(launch): replace 'npm install playwright' with 'npx playwright install' (#7410)

... in the error message
This commit is contained in:
Dmitry Gozman 2021-06-30 16:31:55 -07:00 committed by GitHub
parent fca965cb98
commit 63e6e530ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -166,7 +166,7 @@ export abstract class BrowserType extends SdkObject {
const errorMessageLines = [`Failed to launch ${this._name} because executable doesn't exist at ${executable}`];
// If we tried using stock downloaded browser, suggest re-installing playwright.
if (!executablePath)
errorMessageLines.push(`Try re-installing playwright with "npm install playwright"`);
errorMessageLines.push(`Run "npx playwright install" to install browsers`);
throw new Error(errorMessageLines.join('\n'));
}