You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
playwright-cli.js does require('playwright-core/lib/tools/cli-client/program') but package.json only declares playwright. playwright-core is reached as a transitive of playwright, which pnpm's default isolated linker hides from the package's own node_modules. The require then fails to resolve.
npm's hoisted layout sidesteps this, which is why the README's recommended npm install -g @playwright/cli@latest works.
pnpm 11's per-install isolated global virtual store at {pnpmHomeDir}/global/v11/<hash>/ (https://pnpm.io/blog/releases/11.0) makes the gap visible on every fresh install.
Workaround until merged: set nodeLinker: hoisted in the global pnpm-workspace.yaml (~/.local/share/pnpm/global/v11/pnpm-workspace.yaml on macOS) and reinstall.
Version
@playwright/cli@0.1.11, pnpm 11.0.4, Node 24.15.0, macOS 15.Steps to reproduce
On a system using pnpm's default
isolatednode-linker(a fresh pnpm 11 install with no global override):Expected behavior
playwright-cliprints0.1.11.Actual behavior
The binary crashes immediately:
Additional context
playwright-cli.jsdoesrequire('playwright-core/lib/tools/cli-client/program')butpackage.jsononly declaresplaywright.playwright-coreis reached as a transitive ofplaywright, which pnpm's defaultisolatedlinker hides from the package's ownnode_modules. The require then fails to resolve.npm install -g @playwright/cli@latestworks.{pnpmHomeDir}/global/v11/<hash>/(https://pnpm.io/blog/releases/11.0) makes the gap visible on every fresh install.playwright-coredirectly) was not applied and the bug shipped in0.1.11.nodeLinker: hoistedin the global pnpm-workspace.yaml (~/.local/share/pnpm/global/v11/pnpm-workspace.yamlon macOS) and reinstall.Fix proposed in #397.