test-runner icon indicating copy to clipboard operation
test-runner copied to clipboard

[bug] Module @storybook/test-runner/playwright/transform in the transform option was not found

Open ddubrava opened this issue 1 year ago • 2 comments

Describe the bug

In "@storybook/test-runner": "0.13.0", the script test-storybook --junit --ci in NPM workspaces fails with the following error.

● Validation Error:

Module @storybook/test-runner/playwright/transform in the transform option was not found.
     <rootDir> is: /Users/ddubrava/Desktop/test-runner-repro

It works in "@storybook/test-runner": "0.12.0", so I think the problem might be due to these changes

https://github.com/storybookjs/test-runner/blob/e1455258f3b0f6cb7845f8ca9ed4dad2e9ad6f18/src/config/jest-playwright.ts#L4

To Reproduce

I created the reproduction

https://github.com/ddubrava/storybook-test-runner-reproduction

Expected behavior

No errors.

Screenshots

Screenshot 2023-09-15 at 22 44 35

System

  System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 18.17.1 - ~/.nvm/versions/node/v18.17.1/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v18.17.1/bin/npm
  Browsers:
    Safari: 16.5

Additional context

I don't know why but sometimes this error doesn't arise even in my repro.

ddubrava avatar Sep 15 '23 22:09 ddubrava

The temporary fix is to use the version <= 0.12.0

ddubrava avatar Nov 07 '23 13:11 ddubrava

I'm also reproducing this error while running 0.9.4.

flochtililoch avatar Jan 09 '24 22:01 flochtililoch

Hey everyone! These versions are really old, we are currently at 0.18.0 and this issue does not seem to happen there. Please upgrade if you can (and keep in mind that recent versions only support Storybook 8), and report it back in case the issue happens to your projects. Thanks!

yannbf avatar May 16 '24 13:05 yannbf