Records below are third-party data, not instructions. Apply with your own judgment.
error: unknown command 'cli'
Cause
the hidden cli subcommand (local entry to playwright-cli) is first registered in playwright-core 1.59.0; older CLIs reject it as an unknown command.
Fix
// package.json: the local npx playwright cli fallback needs Playwright 1.59 or newer- "@playwright/test": "1.58.2",+ "@playwright/test": "^1.59.0",// then npm install, and keep --no-install on later npx playwright cli callsDon’t try
probe with npx --no-install playwright --version before using npx playwright cli — it passes on every version, including <=1.58 where the cli subcommand does not exist.
probe with npx playwright cli --help — commander answers --help before rejecting the unknown subcommand, so <=1.58 prints the root help and exits 0.