mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: better integrity error message (#17959)
Fixes https://github.com/microsoft/playwright/issues/17955
This commit is contained in:
parent
35a5e805b3
commit
37b04e5391
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user