-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
TypeError: Jest: Got error running globalSetup - /[root]/node_modules/@storybook/test-runner/playwright/global-setup.js, reason: Class extends value #<Object> is not a constructor or null #18120
Comments
I got the same issue with: "@storybook/jest": "^0.0.10",
"@storybook/test-runner": "^0.0.8",
"@storybook/testing-library": "^0.0.11",
"@storybook/addon-essentials": "^6.4.22", it result as:
|
Looks like this issue is related to storybookjs/test-runner#99 "jest": "^27.5.1",
"jest-runner": "^27.5.1",
"jest-environment-node": "27.5.1" |
Indeed with Jest 27 it is ok but Jest 28 throws error |
For me it also works with "resolutions": {
"jest": "28.1.3",
"jest-runner": "28.1.3",
"jest-environment-node": "28.1.3"
} |
Just leaving my 2 cents here, hope it helps few folks.
Got the same error as mentioned in this ticket. Hence downgraded the @storybook/test-runner version to V.0.6.4, which is the last version to have a dependency of Jest less than V.28. It works. |
This has resolved my issue, thank you very much! Just a small comment - there is a typo in your post, it's v0.6.4 test-runner needs to be downgraded to |
I'm in the same boat i.e using Create React App. Downgrading |
…). Upgraded to v29 but it requires Node 14.5 and above so also updating GitHub workflow
Describe the bug
When trying
test-storybook
, we get the following error:TypeError: Jest: Got error running globalSetup - /[root]/node_modules/@storybook/test-runner/playwright/global-setup.js, reason: Class extends value #<Object> is not a constructor or null
the trace is:
To Reproduce
Run 'test-storybook' to see the above error:
Repository: https://github.com/ryanbuckleyca/sbbug
Deployed repo: https://sbbug.herokuapp.com/
System
(note, the same bug occurs in our development environment as well, so it is not specific to this system)
Environment Info:
System:
OS: macOS 12.3.1
CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
Binaries:
Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node
npm: 8.7.0 - ~/.nvm/versions/node/v14.15.5/bin/npm
Browsers:
Firefox: 99.0.1
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/addon-docs: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/addon-essentials: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/addon-interactions: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/addon-links: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/builder-webpack4: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/manager-webpack4: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/react: ^6.5.0-beta.1 => 6.5.0-beta.1
@storybook/testing-library: ^0.0.11 => 0.0.11
The text was updated successfully, but these errors were encountered: