Skip to content

Error: require() of ES Module dom-accessibility-api/dist/index.mjs not supported. #1065

@c0d3x

Description

@c0d3x

When I run vitest on a button.test.jsx file, i get this error:

Error: require() of ES Module .../node_modules/dom-accessibility-api/dist/index.mjs not supported.
Instead change the require of .../node_modules/dom-accessibility-api/dist/index.mjs to a dynamic import() which is available in all CommonJS modules.
 ❯ Object.<anonymous> node_modules/@testing-library/react/node_modules/@testing-library/dom/dist/suggestions.js:7:28

Any suggestions? Is it a bug in dom-accessibility-api?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions