Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: better integrity error message #17959

Merged
merged 1 commit into from
Oct 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/playwright-core/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,11 @@ if (!process.env.PW_LANG_NAME) {
require('playwright');
hasPlaywrightPackage = true;
} catch {}
const strayPackage = hasPlaywrightPackage ? 'playwright' : 'playwright-core';
console.error(wrapInASCIIBox([
`Playwright Test compatibility check failed:`,
`@playwright/test version '${pwTestVersion}' does not match ${hasPlaywrightPackage ? 'playwright' : 'playwright-core'} version '${pwCoreVersion}'!`,
`To fix this either align the versions or only keep @playwright/test since it depends on playwright-core.`,
`If you still receive this error, execute 'npm ci' or delete 'node_modules' and do 'npm install' again.`,
`Playwright Test integrity check failed:`,
`You have @playwright/test version '${pwTestVersion}' and '${strayPackage}' version '${pwCoreVersion}' installed!`,
`You probably added '${strayPackage}' into your package.json by accident, remove it and re-run 'npm install'`,
].join('\n'), 1));
process.exit(1);
}
Expand Down