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
When trying to run yarn test-storybook in a Next.js project, using yarn pnp, I get the following error:
PlaywrightError: jest-playwright-preset: Cannot find playwright package to use chromium
at getPlaywrightInstance (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/jest-playwright-preset-virtual-028de7a7f8/0/cache/jest-playwright-preset-npm-2.0.0-5c5b33e0e6-262e261c09.zip/node_modules/jest-playwright-preset/lib/utils.js:113:19)
at PlaywrightRunner.getTests (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/jest-playwright-preset-virtual-028de7a7f8/0/cache/jest-playwright-preset-npm-2.0.0-5c5b33e0e6-262e261c09.zip/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:84:99)
at PlaywrightRunner.runTests (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/jest-playwright-preset-virtual-028de7a7f8/0/cache/jest-playwright-preset-npm-2.0.0-5c5b33e0e6-262e261c09.zip/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:124:41)
at async TestScheduler.scheduleTests (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/@jest-core-virtual-86f96f357a/0/cache/@jest-core-npm-28.1.3-4b9647f71c-cb79f34baf.zip/node_modules/@jest/core/build/TestScheduler.js:317:13)
at async runJest (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/@jest-core-virtual-86f96f357a/0/cache/@jest-core-npm-28.1.3-4b9647f71c-cb79f34baf.zip/node_modules/@jest/core/build/runJest.js:407:19)
at async _run10000 (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/@jest-core-virtual-86f96f357a/0/cache/@jest-core-npm-28.1.3-4b9647f71c-cb79f34baf.zip/node_modules/@jest/core/build/cli/index.js:339:7)
at async runCLI (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/@jest-core-virtual-86f96f357a/0/cache/@jest-core-npm-28.1.3-4b9647f71c-cb79f34baf.zip/node_modules/@jest/core/build/cli/index.js:190:3)
at async Object.run (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/__virtual__/jest-cli-virtual-3cf6179c47/0/cache/jest-cli-npm-28.1.3-aab5c7389d-fb424576bf.zip/node_modules/jest-cli/build/cli/index.js:155:37)
at async executeJestPlaywright (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/cache/@storybook-test-runner-npm-0.12.0-7653174f80-bf8e463351.zip/node_modules/@storybook/test-runner/dist/test-storybook.js:128:3)
at async main (/home/xxxxxx/xxxxxx/xxxxxx/.yarn/cache/@storybook-test-runner-npm-0.12.0-7653174f80-bf8e463351.zip/node_modules/@storybook/test-runner/dist/test-storybook.js:272:3)
To Reproduce
Create a new Next.js project (in my case with TypeScript)
Hey everyone, thanks for reporting this issue. Unfortunately there isn't much we can do to make the test-runner work out of the box because the issue lies on a dependency of the package instead (jest-playwright-preset), but the solutions are now documented in the README of the test-runner repo.
Describe the bug
When trying to run
yarn test-storybook
in a Next.js project, using yarn pnp, I get the following error:To Reproduce
yarn test-storybook
System
Additional context
When changing the nodeLinker to node-modules, the tests run without any problems.
The text was updated successfully, but these errors were encountered: