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.

Uncaught SyntaxError: Unexpected token export

See original GitHub issue

After reading this repository’s README and the documentation section of the website I am forced to report this.

I tried to include this library in my page because Bootstrap requires it, but I got this error: Uncaught SyntaxError: Unexpected token export

The script tag importing Popper is <script type="text/javascript" src="js/popper.min.js"></script> and the file is the regular release download.

Is there a proper way of including this file that I’m not aware of? Alternatively, if there is a way to use Bootstrap without requiring this library, that would work for me too. Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

81reactions
fishencommented, Oct 31, 2017

use script file under the umd directory ,“popper.js/dist/umd/popper.min.js” instead of “popper.js/dist/popper.min.js”"

2reactions
fmagrosotocommented, Jan 19, 2018

fishen wrote a better solution: Try to copy ‘popper.js/dist/umd/popper.min.js’

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token 'export' in JavaScript
To solve the "Uncaught SyntaxError Unexpected token 'export'" error, set the type property to module in your package.json file.
Read more >
Getting Unexpected Token Export - javascript - Stack Overflow
NodeJS versions prior to v14.13.0 do not support ESM ( export keyword syntax) and use CommonJS Modules ... Uncaught SyntaxError: Unexpected token export....
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 >
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 >
SyntaxError: Unexpected token 'export' - Abhishek Kumar
In case you are getting error like 'Unexpected token export' while starting the server, then export like below in schema.js
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