Uncaught SyntaxError: Unexpected token export
See original GitHub issueAfter 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:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top 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 >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
use script file under the umd directory ,“popper.js/dist/umd/popper.min.js” instead of “popper.js/dist/popper.min.js”"
fishen wrote a better solution: Try to copy ‘popper.js/dist/umd/popper.min.js’