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

[Bug]: Cannot do 'yarn create playwright --ct' without error #30349

Closed
ErwanPiaut opened this issue Apr 12, 2024 · 2 comments
Closed

[Bug]: Cannot do 'yarn create playwright --ct' without error #30349

ErwanPiaut opened this issue Apr 12, 2024 · 2 comments

Comments

@ErwanPiaut
Copy link

Version

1.43.0

Steps to reproduce

  1. Clone repo at https://github.com/ErwanPiaut/playwright-project.git
  2. yarn install
  3. yarn create playwright --ct
  4. Choose Javascript
  5. Choose Web components
  6. Keep the other option as default
  7. You should see the error

Expected behavior

I expect the installation to work.

Actual behavior

yarn add v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 13 new dependencies.
info Direct dependencies
└─ @sand4rt/experimental-ct-web@1.41.0
info All dependencies
├─ @esbuild/linux-x64@0.18.20
├─ @playwright/experimental-ct-core@1.43.0
├─ @rollup/rollup-linux-x64-gnu@4.14.2
├─ @rollup/rollup-linux-x64-musl@4.14.2
├─ @sand4rt/experimental-ct-web@1.41.0
├─ @types/estree@1.0.5
├─ esbuild@0.18.20
├─ nanoid@3.3.7
├─ picocolors@1.0.0
├─ postcss@8.4.38
├─ rollup@3.29.4
├─ source-map-js@1.2.0
└─ vite@4.5.3
Done in 2.74s.
Downloading browsers (yarn playwright install)…
yarn run v1.22.19
$ /home/florence/Test_poc/temp/playwright-project/node_modules/.bin/playwright install
node:internal/modules/cjs/loader:598
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './cli' is not defined by "exports" in /home/florence/Test_poc/temp/playwright-project/node_modules/@playwright/experimental-ct-core/package.json
at exportsNotFound (node:internal/modules/esm/resolve:303:10)
at packageExportsResolve (node:internal/modules/esm/resolve:650:9)
at resolveExports (node:internal/modules/cjs/loader:591:36)
at Module._findPath (node:internal/modules/cjs/loader:668:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
at Module._load (node:internal/modules/cjs/loader:985:27)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object. (/home/florence/Test_poc/temp/playwright-project/node_modules/@sand4rt/experimental-ct-web/cli.js:17:18)
at Module._compile (node:internal/modules/cjs/loader:1376:14) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v20.11.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command failed: yarn playwright install
at checkExecSyncError (node:child_process:890:11)
at execSync (node:child_process:962:15)
at executeCommands (/home/florence/.config/yarn/global/node_modules/create-playwright-sand4rt/lib/index.js:4519:39)
at Generator.run (/home/florence/.config/yarn/global/node_modules/create-playwright-sand4rt/lib/index.js:4679:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /home/florence/.config/yarn/global/node_modules/create-playwright-sand4rt/lib/index.js:4977:3 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 29795,
stdout: null,
stderr: null
}
error Command failed.
Exit code: 1
Command: /home/florence/.yarn/bin/create-playwright
Arguments: --ct
Directory: /home/florence/Test_poc/temp/playwright-project
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

Additional context

No response

Environment

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (4) x64 Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz
    Memory: 10.85 GB / 15.29 GB
    Container: Yes
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
  IDEs:
    VSCode: 1.87.1 - /usr/bin/code
  Languages:
    Bash: 5.1.16 - /usr/bin/bash
  npmPackages:
    @playwright/test: ^1.43.0 => 1.43.0
@mxschmitt
Copy link
Member

mxschmitt commented Apr 12, 2024

Looks not like a Playwright bug and more a bug in playwright-sand4rt.

Since https://github.com/sand4rt/playwright-ct-web/blob/master/playwright-ct-web/cli.js#L17 is using a different CLI than https://github.com/microsoft/playwright/blob/main/packages/playwright-ct-react/cli.js#L18.

(since component testing is experimental, things like this are not covered by SemVer, yet).

I recommend filing an issue here: https://github.com/sand4rt/playwright-ct-web

cc @sand4rt

@sand4rt
Copy link
Collaborator

sand4rt commented Apr 12, 2024

Indeed, this issue is present in @sand4rt/experimental-ct-web. @ErwanPiaut, could you transfer the issue to that repository?

I'm following Playwright's release cycle to prevent occurrences like this, but i'm currently unable to upgrade due to #30269. While this is the first time this has happened in a year, be aware that similar situations may arise in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants