component-driven / component-driven/cypress-axe

require function is used in a way in which dependencies cannot be statically extracted

Open
#99 1 comment 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
641
Forks
90
Avg merge
6h 8m
Merged PRs (30d)
1

Description

Howdy, I am getting a similar output to this issue filed in axe-core:
https://github.com/dequelabs/axe-core/issues/2840

Using Cypress 7 with their dev server, Component testing via cypress open-ct, and mount(<p>LOL</p>).checkA11y():

WARNING in ../node_modules/cypress-axe/dist/index.js 16:47-54
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
 @ ../cypress/support.js 1:0-21
 @ ./cypress/support/index.js 34:0-34
 @ ../node_modules/@cypress/webpack-dev-server/dist/loader.js!../node_modules/@cypress/webpack-dev-server/dist/browser.js 2:30-94
 @ ../node_modules/@cypress/webpack-dev-server/dist/browser.js 2:4-41

Versions:

node: 12.13.0
npm: 6.12.0

"@cypress/code-coverage": "3.9.5",
"@cypress/react": "5.7.0",
"@cypress/webpack-dev-server": "1.2.0",
"@testing-library/cypress": "7.0.6",
"axe-core": "4.2.0",
"cypress": "7.3.0",
"cypress-axe": "0.12.2",

Is this an issue with cypress-axe or axe-core?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting node_modules/cypress-axe/dist/index.js at the warning location and the Cypress webpack dev-server path shown in the build output. Compare the reported cypress-axe and axe-core versions to determine which dependency uses the dynamic require; done means identifying the responsible package and removing or appropriately handling the static-dependency warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript, webpack
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.