After upgrading our ASP.NET MVC 4 project to jQuery 1.9, our application started to fail with the following error message:
This is caused by the fact that starting from jQuery 1.9 a map file is added to the NuGet package. In my BundleConfig.cs I had the following:
To solve this update the BundleConfig.cs to:
This is caused by the fact that starting from jQuery 1.9 a map file is added to the NuGet package. In my BundleConfig.cs I had the following:
The wildcard was being used to get the latest version of jQuery, however, this caused the map file to be included as well.bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-1.*"));
To solve this update the BundleConfig.cs to:
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( "~/Scripts/jquery-{version}.js"));