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
> jest --coverage
Error: Jest: Failed to parse the TypeScript config file /Users/gvalenc/git/DevX/blueprint4ts/jest.config.ts
Error: Must use import to load ES Module: /Users/gvalenc/git/DevX/blueprint4ts/jest.config.ts
require() of ES modules is not supported.
require() of /Users/gvalenc/git/DevX/blueprint4ts/jest.config.ts from /Users/gvalenc/git/DevX/blueprint4ts/node_modules/jest-config/build/readConfigFileAndSetRootDir.js is an ES module file as it is a .ts file whose nearest parent package.json contains "type": "module" which defines all .ts files in that package scope as ES modules.
Instead change the requiring code to use import(), or remove "type": "module" from /Users/gvalenc/git/DevX/blueprint4ts/package.json.
Can anyone give me some pointers what might be going on?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have what I think is a pretty basic Jest config written in TS:
However, I get this:
Can anyone give me some pointers what might be going on?
Beta Was this translation helpful? Give feedback.
All reactions