Cannot use import statement outside a module #426
Answered
by
sholladay
HarryOMalley
asked this question in
Q&A
-
When I try to add Ky to my project, I get the following error when attempting to run tests with Jest: `
` At first I thought I had a configuration wrong with my project, before I realised that it is complaining about the import statement in Ky itself. Does anyone know how I can fix this? |
Beta Was this translation helpful? Give feedback.
Answered by
sholladay
Feb 23, 2022
Replies: 1 comment 1 reply
-
Jest dose some weird transform stuff to your dependencies, which breaks ES modules. They have experimental support for turning that stuff off, finally. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
HarryOMalley
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jest dose some weird transform stuff to your dependencies, which breaks ES modules.
They have experimental support for turning that stuff off, finally.
https://jestjs.io/docs/ecmascript-modules