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

[@storybook/addon-a11y]: Critical dependency issue #14321

Closed
fcisio opened this issue Mar 23, 2021 · 11 comments
Closed

[@storybook/addon-a11y]: Critical dependency issue #14321

fcisio opened this issue Mar 23, 2021 · 11 comments

Comments

@fcisio
Copy link

fcisio commented Mar 23, 2021

Describe the bug
Enabling @storybook/addon-a11y logs this dependency error.

⚠️ Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

  • The issue seems to be present at least from 6.1.19 to 6.1.21.
  • Disabling the addon fixes the issue.
  • While the error is logged, it doesn't seem to affect the app

Expected behavior
The console should run without errors

Screenshots
ScreenShot 2021-03-23 at 5 04 51 PM

System
System:
OS: macOS 11.1
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Binaries:
Node: 14.15.4 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.10 - /usr/local/bin/npm
Browsers:
Chrome: 89.0.4389.90
Firefox: 86.0.1
Safari: 14.0.2

@PLSFIX
Copy link

PLSFIX commented Mar 24, 2021

Same

@andrewdoyle19
Copy link

Also getting this issue.

@shilman
Copy link
Member

shilman commented Mar 26, 2021

If you want this fixed, please upvote by adding a 👍 to the issue description. We use this to help prioritize!

@mts
Copy link

mts commented Mar 26, 2021

  • Reproducible here through the following steps using Node v14.16.0, NPM v6.14.4 and Storybook v6.1.21:

image

@shilman
Copy link
Member

shilman commented Mar 26, 2021

Try upgrading to the latest prerelease:

npx sb@next upgrade --prerelease

Does that fix it?

@mts
Copy link

mts commented Mar 26, 2021

@shilman Yes, upgrading to the latest prerelease fixes it.
image

@panjiesw
Copy link

panjiesw commented Apr 6, 2021

The warning still comes up in v6.2.3 for /node_modules/axe-core/axe.js, not in CLI console when running start-storybook, but in browser console as well as when running build-storybook.

Browser console:

2021-04-06-164319_4480x1440_scrot

build-storybook:

2021-04-06-164456_4480x1440_scrot

@shilman
Copy link
Member

shilman commented Apr 6, 2021

@panjiesw Do you (or anybody else) have a repro repo you can share that uses 6.2.x and exhibits this behavior?

@mts
Copy link

mts commented Apr 6, 2021

@shilman I have a repro repo using the latest Storybook v6.2.3, but the critical dependency warning has already disappeared since v6.2.0 and Storybook build looks good.

@shilman
Copy link
Member

shilman commented Apr 6, 2021

Ok thanks! I'm going to call this closed until somebody produces a 6.2.3+ repro.

@panjiesw
Copy link

panjiesw commented Apr 6, 2021

@shilman @mts turns out it was because of issue in axe-core@4.1.3 dequelabs/axe-core#2843

Tried to reproduce using fresh install, the issue disappeared because there is a new release of axe-core@4.1.4 that resolves this.

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

No branches or pull requests

6 participants