5.1.0: unexpected token "export" when running jest
See original GitHub issueHi again!
I’m getting another error in my CI since the 5.1.0 release:
That error seems to be coming from this:
It appears that the main
property of package.json
points towards a ES2015 module instead of a ES5 module?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Jest gives an error: "SyntaxError: Unexpected token export"
This means, that a file is not transformed through TypeScript compiler, e.g. because it is a JS file with TS syntax, or it...
Read more >Unexpected token export · Issue #2550 · facebook/jest - GitHub
I use react-icons in my component and when I try to render it with react-test-render I get this: `"C:\Program Files\JetBrains\WebStorm ...
Read more >Jest SyntaxError: Unexpected token 'export'
For Webpack it is fine because it passes all the code through Babel, links all dependencies, and transpile them to vanilla js which...
Read more >Jest throwing `SyntaxError: Unexpected token import` on new ...
I am trying to write first Jest test for a function: export default ... Jest throwing `SyntaxError: Unexpected token import` on new Vue...
Read more >jest-preset-angular - npm
Start using jest-preset-angular in your project by running `npm i jest-preset-angular`. ... Unexpected token [import|export|other].
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
Change was apparently released on countup.js.
should be fixed in 5.2.0