The error occurred in the require([.
<script type="text/javascript" xml="space">
// <![CDATA[
require([ <-- The Error occured here
'jquery',
'owlcarousel',
], function ($) {
$(document).ready(function () {
$("#recent-slider").owlCarousel({
loop: false,
margin: 17,
responsiveClass: true,
nav: true,
dots: false,
responsive:{
0:{
items: 1,
nav: true
},
1024:{
items: 3,
nav: true
},
668:{
items: 2,
nav: true,
loop: false
}
}
});
});
});
// ]]>
</script>
Error: Mismatched anonymous define() module: function(){return function Q(a,o,s){function l(n,e){if(!o[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(d)return d(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=o[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return l(t||e)},i,i.exports,Q,a,o,s)}return o[n].exports}for(var d="function"==typeof require&&require,e=0;e<s.length;e++)l(s[e]);return l}({1:[function(e,t){function n(e){this.name="RavenConfigError",this.message=e}n.prototype=new Error,n.prototype.constructor=n,t.exports=n},{}],2:[function(e,t){var l=e(5),n=function(e,r,i){var a=e[r],o=e;if(r in e){var s="warn"===r?"warning":r;e[r]=function(){var e=[].slice.call(arguments),t=l.safeJoin(e," "),n={level:s,logger:"console",extra:{arguments:e}};"assert"===r?!1===e[0]&&(t="Assertion failed: "+(l.safeJoin(e.slice(1)," ")||"console.assert"),n.extra.arguments=e.slice(1),i&&i(t,n)):i&&i(t,n...
-
see if this is related to you magento.stackexchange.com/questions/177187/…Mohit Rane– Mohit Rane2019年08月30日 04:23:43 +00:00Commented Aug 30, 2019 at 4:23
-
@MohitRane Thanks for the links. It helpsTora– Tora2019年08月30日 07:07:56 +00:00Commented Aug 30, 2019 at 7:07
-
it was the external js thats causing the error. if anyone is having the same error. Try to load the external js with require. ex: require(['url.js']);Tora– Tora2019年08月30日 07:23:02 +00:00Commented Aug 30, 2019 at 7:23
-
ok I'm adding as an answer since it resolved your issue. Accept my answer so it will help others as well. ;)Mohit Rane– Mohit Rane2019年08月30日 07:38:24 +00:00Commented Aug 30, 2019 at 7:38
1 Answer 1
Please see below solution, this could be your external js error
Magento 2 - Mismatched anonymous define()
Hope it helps.