chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
28 stars 1 forks source link

ReferenceError: regeneratorRuntime is not defined #293

Open igoldny opened 2 months ago

igoldny commented 2 months ago

Describe the bug

After installing addon-visual-tests on our repo some stories got broken. We get ReferenceError: regeneratorRuntime is not defined error in stories and chromatic test run is failing on those stories.

Just to be clear those stories working prefectly fine without addon-visual-tests.

After diving into the error, it is happening on stories where we use internal old package that we cannot update since it deprecated but some team still using it and we'll have to support it for a while. This is a dropdown package using old downshift version (details below)

To reproduce

to mimic the internal package you can try to create package with the following dependencies:

"dependencies": {
"cypress-wait-until": "^1.7.1",
"downshift": "^6.1.7",
"lodash.debounce": "^4.0.8",
"lodash.differencewith": "^4.5.0",
"lodash.isequal": "^4.5.0",
"prop-types": "^15.7.2",
"react-virtualized": "^9.22.3",
"stickyard": "^0.3.0"
}

Environment

OS X - Chrome -Storybook 8 - "@chromatic-com/storybook": "^1.3.3" But happens in chromatic cloud as well You can dm me if you want me to provide chromatic build url.

JReinhold commented 2 months ago

Does the error happen when

  1. opening the story locally in Storybook dev?
  2. ... or only with a built Storybook?
  3. ... or only when running local builds with the addon?
  4. ... or does the error also happen when running normal Chromatic builds via CI (with the addon installed)

I'm trying to pinpoint if merely having the addon installed causes this error, or if this error only occurs when you trigger local builds with the addon.

To be able to debug this further it would be great if you could provide a minimal reproduction repository that demonstrates the error in a minimal setup. See https://storybook.js.org/docs/contribute/how-to-reproduce

igoldny commented 2 months ago

Happens only when addon-visual-tests is on in all options locally, static build, chromatic storybook (both locally and normal build). Seems to be related to installing the addon.