node:internal/modules/cjs/loader:553
throw e;
^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/program' is not defined by "exports" in /[...]/node_modules/playwright-core/package.json
at new NodeError (node:internal/errors:405:5)
at exportsNotFound (node:internal/modules/esm/resolve:259:10)
at packageExportsResolve (node:internal/modules/esm/resolve:589:9)
at resolveExports (node:internal/modules/cjs/loader:547:36)
at Module._findPath (node:internal/modules/cjs/loader:621:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
at Module._load (node:internal/modules/cjs/loader:901:27)
at Module.require (node:internal/modules/cjs/loader:1115:19)
at require (node:internal/modules/helpers:130:18)
at Object.<anonymous> (/[...]/node_modules/playwright-chromium/cli.js:18:21) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
Node.js v20.6.1
Additional context
I have tested this both locally on macOS 14.3.1 and in CI (Ubuntu 20.04) - same result. If I run the same command using version 1.41.2 everything works.
Version
1.42.0
Steps to reproduce
Run the following command:
Expected behavior
Playwright installs successfully.
Actual behavior
An error is thrown:
Additional context
I have tested this both locally on macOS 14.3.1 and in CI (Ubuntu 20.04) - same result. If I run the same command using version 1.41.2 everything works.
Environment