You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dev dependencies:
"@testing-library/jest-dom": "^6.4.1",
"@testing-library/react": "^14.2.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Run jest --passWithNoTests
Expected behavior
Runs actual tests
Actual behavior
Throw the following exception:
Error [ERR_REQUIRE_ESM]: require() of ES Module <dir>/node_modules/string-width/index.js from <dir>/node_modules/cliui/build/index.cjs not supported.
Instead change the require of index.js in <dir>/node_modules/cliui/build/index.cjs to a dynamic import() which is available in all CommonJS modules.
at Object.<anonymous> (<dir>/node_modules/cliui/build/index.cjs:291:21)
at Object.<anonymous> (<dir>/node_modules/yargs/build/index.cjs:1:60678)
at Object.<anonymous> (<dir>/node_modules/yargs/index.cjs:5:30)
at _yargs (<dir>/node_modules/jest-cli/build/run.js:30:39)
at buildArgv (<dir>/node_modules/jest-cli/build/run.js:149:26)
at Object.run (<dir>/node_modules/jest-cli/build/run.js:124:24)
at Object.<anonymous> (<dir>/node_modules/jest-cli/bin/jest.js:16:17)
at Object.<anonymous> (<dir>/node_modules/jest/bin/jest.js:12:3)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
29.7.0
Steps to reproduce
Dev dependencies:
"@testing-library/jest-dom": "^6.4.1",
"@testing-library/react": "^14.2.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Run
jest --passWithNoTests
Expected behavior
Runs actual tests
Actual behavior
Throw the following exception:
Additional context
Might be related as they face the same issue with the dependency string-width
isaacs/jackspeak#5
https://stackoverflow.com/questions/77186044/error-require-of-es-module-when-trying-to-run-a-node-container
TSConfig;
Environment
The text was updated successfully, but these errors were encountered: