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

Error in experimental-vm-modules , got SyntaxError: The requested module '@jest/globals' does not provide an export named 'default' #529

Closed
jaredhan418 opened this issue Aug 28, 2023 · 1 comment · Fixed by #530
Labels
bug Something isn't working released

Comments

@jaredhan418
Copy link

  • @testing-library/jest-dom version: 6.1.2
  • node version: 18.16
  • npm (or yarn) version: 9.5.1

Relevant code or config:

// testing.setup.ts
import "@testing-library/jest-dom/jest-globals";

What you did:

I am running jest test by pure ESM mode, and setup jest.config.js by tutorial.

node --experimental-vm-modules node_modules/jest/bin/jest.js

All the things works good until upgrade to version 6.1.2

What happened:

I got jest import error

 SyntaxError: The requested module '@jest/globals' does not provide an export named 'default'

      at Runtime.linkAndEvaluateModule (node_modules/jest-runtime/build/index.js:708:5)

Reproduction:

截屏2023-08-28 13 04 36

just when jest-globals.msj start to import globals from '@jest/globals'; jest will throw error

Problem description:

Suggested solution:

@nickserv nickserv added the bug Something isn't working label Sep 6, 2023
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

🎉 This issue has been resolved in version 6.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants