question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jest encountered an unexpected token with react + konva and/or react-konva

See original GitHub issue

I’m getting the same error as posted on StackOverflow:

https://stackoverflow.com/questions/67919198/jest-encountered-an-unexpected-token-with-react-konva-and-or-react-konva

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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maxxxymumcommented, Sep 10, 2021

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

0reactions
Amoodaacommented, Aug 22, 2022

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found