I'm a beginner with bootstrap and jquery, and I'm attempting to utilize the datatables feature for sorting. However, when I run my code, I encounter the following error in the console:
uncaught SyntaxError: Unexpected token export at popper.js:2371
The version of my popper.js is 1.14.3 and I include it in my layout like this:
<body>
@Html.Partial("_navbar")
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year -www.vidly.com @*My ASP.NET Application*@</p>
</footer>
</div>
@* @Scripts.Render("~/bundles/lib")*@
@Scripts.Render("~/Scripts/jquery-3.3.1.js")
@Scripts.Render("~/Scripts/DataTables/jquery.dataTables.min.js")
@Scripts.Render("~/Scripts/DataTables/dataTables.bootstrap4.min.js")
@Scripts.Render("~/Scripts/popper.js")
@Scripts.Render("~/Scripts/bootstrap.js")
@Scripts.Render("~/Scripts/bootbox.js")
@Scripts.Render("~/Scripts/respond.js")
@Scripts.Render("~/Scripts/DataTables/jquery.dataTables.js")
@Scripts.Render("~/Scripts/DataTables/DataTables.bootstrap.js")
@*@Styles.Render("~/Content/css")*@
@RenderSection("scripts", required: false)
</body>
Here is https://i.sstatic.net/oqKn9.png the screenshot from my browser. I have two questions: 1. Why am I getting this error:
uncaught SyntaxError: Unexpected token export at popper.js:2371
2. Why are the datatables features like page numbers and sorting methods not displaying correctly in my browser (as shown in the screenshot)? These are my CSS bundles:
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap-lumen.css",
"~/Content/DataTables/css/dataTables.bootstrap.css",
"~/Content/site.css"));
I include it in my _layout like this:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@*@Scripts.Render("~/bundles/lib")*@
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@Html.Partial("_navbar")
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year -www.vidly.com @*My ASP.NET Application*@</p>
</footer>
</div>
@Scripts.Render("~/bundles/lib")
@RenderSection("scripts", required: false)
</body>
</html>
Thanks in advance