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
● Test suite failed to run
Call retries were exceeded
at ChildProcessWorker.initialize (../../node_modules/jest-worker/build/workers/ChildProcessWorker.js:193:21)
making this part sync require fixes the issue
related to this thread: jestjs/jest#8769
doesn't happen in ts-jest.
were able to get more informed error by simplifying the case
Error
:
at invariant (/node_modules/jest-runtime/build/index.js:2004:11)
at importModuleDynamically (/node_modules/jest-runtime/build/index.js:1362:11)
at importModuleDynamicallyWrapper (node:internal/vm/module:448:21)
at exports.importModuleDynamicallyCallback (node:internal/process/esm_loader:30:14)
UPDATE:
updated to jest 27, got this error, which is more informative:
Error: You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules
at invariant (/node_modules/jest-runtime/build/index.js:2137:11)
at importModuleDynamically (/node_modules/jest-runtime/build/index.js:1486:11)
at importModuleDynamicallyWrapper (node:internal/vm/module:448:21)
at exports.importModuleDynamicallyCallback (node:internal/process/esm_loader:30:14)
were able to follow some of the instructions in the doc. after adding --experimental-vm-modules to the node jest command manually, the test passed.
The text was updated successfully, but these errors were encountered:
AlonMiz
changed the title
Lazy import causes jest worker to fail
Lazy/Dynamic import causes jest worker to fail
Aug 8, 2021
making this part sync require fixes the issue
related to this thread: jestjs/jest#8769
doesn't happen in ts-jest.
were able to get more informed error by simplifying the case
reproduce:
test.js
lazy.js
UPDATE:
updated to jest 27, got this error, which is more informative:
were able to follow some of the instructions in the doc. after adding
--experimental-vm-modules
to the node jest command manually, the test passed.The text was updated successfully, but these errors were encountered: