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.

Unexpected token export

See original GitHub issue

As part of reactstrap, we are facing this error, when running jest tests. Any help will be appreciated.

 /Users/venelin/projects/stylbum-web-v2/node_modules/react-popper/lib/react-popper.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export { default as Manager } from './Manager';
                                                                                             ^^^^^^

    SyntaxError: Unexpected token export

      at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:289:17)
      at Object.<anonymous> (node_modules/reactstrap/dist/reactstrap.cjs.js:14:19)
      at Object.<anonymous> (src/Auth/Login/Login.jsx:5:19)

https://github.com/reactstrap/reactstrap/issues/872

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:16
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sinxwalcommented, Feb 28, 2018

@nickmccurdy Use reactstrap": “5.0.0-beta” version for a short.

2reactions
FezVrastacommented, Mar 19, 2018

This should be fixed in 0.8.3

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Unexpected Token Export - javascript - Stack Overflow
I solved it by declaring a type as a module when adding a script tag in my index. html file.
Read more >
How to fix SyntaxError: Unexpected token 'export' in JavaScript?
In this article, we are going to see How to fix SyntaxError: Unexpected token 'export' in JavaScript? and what are Es6 modules.
Read more >
SyntaxError: Unexpected token 'export' in JavaScript [Fixed]
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type of your <script /> tags to module , e.g. <script type="module"...
Read more >
How to Solve Unexpected Token 'export' Error in JavaScript
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type property to module in your package.json file.
Read more >
How to Fix „Uncaught SyntaxError: Unexpected token 'export
Using type="module" on the <script> tag solved the „Unexpected token export ” error. The browser runs the imported JavaScript without issues.
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