Jest encountered an unexpected token with react + konva and/or react-konva
See original GitHub issueI’m getting the same error as posted on StackOverflow:
I’ve also tried the comment in the suggestion yarn add konva canvas
to no effect.
This seems to be prevneting us from upgrading
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Jest encountered an unexpected token with react + konva ...
Jest encountered an unexpected token This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not...
Read more >Jest encountered an unexpected token with react + konva and ...
Coding example for the question Jest encountered an unexpected token with react + konva and/or react-konva-Reactjs.
Read more >Jest encountered an unexpected token with react + konva and ...
Jest encountered an unexpected token This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not...
Read more >Jest encountered an unexpected token w..
Jest encountered an unexpected token with react + konva andor react-konva react,konva,javascript,jest,unexpected.
Read more >[Solved] Jest encountered an unexpected token with react ...
Peter Vida HU Asks: Jest encountered an unexpected token with react + konva and/or react-konva With Konva and react-konva installed and imported, my......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Faced the same issue with Jest, react-testing-library. So I have started my investigation. I am going to update you here with my findings.
It seems that it’s some kind of issue with transpiling ESM to CommonJS.
https://github.com/facebook/jest/issues/11753 https://github.com/facebook/jest/issues/9430
@lavrton I made a repro repo, this is a fresh create-react-app with typescript template https://github.com/Amoodaa/konva-jest-repro check the first few commits