I am using below scripts in my page and have included popper.min.js using CDN but getting an error, "Syntax error Unexpected token 'export' popper.min.js"
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.full.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.15.0/popper.min.js"></script>
Here is the error image, take a look
How can I resolve the above issue?
Instead of using CDN link, download popper.min.js in your project and then use it.
You can download it from link
https://getbootstrap.com/docs/4.1/assets/js/vendor/popper.min.js
and then use it as
<script src="~/Scripts/popper.min.js"></script>
OR
It it still doesn't work, make sure Order of your scripts as below
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="~/Scripts/jquery-3.0.0.min.js"></script>
<script src="~/Scripts/umd/popper.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
Because Bootstrap 4 requires popper.min.js
Above solution is perfect, but you can also use Bootstrap Bundled JS files (bootstrap.bundle.js and minified bootstrap.bundle.min.js) which include [Popper](https://popper.js.org/), but not jQuery.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly