0

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…

4
  • see if this is related to you magento.stackexchange.com/questions/177187/…
    – Mohit Rane
    Aug 30, 2019 at 4:23
  • @MohitRane Thanks for the links. It helps
    – Tora
    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
    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
    Aug 30, 2019 at 7:38

1 Answer 1

1

Please see below solution, this could be your external js error

Magento 2 - Mismatched anonymous define()

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.