RequireJS components sometimes not loadingMagento2 not reading my requirejs-config.jsMagento 2 RequireJs callback not calledRequirejs shim option not workingMagento 2 from Bitnami on Amazon Lightsail VPS servers won't upgrade and requires reindexing all the timeProblems moving magento2 from shared cpanel to dedicated Centos 6 LAMP serverrequirejs-config.js compiling with wrong codeRequireJs magento2 loading custom js plugin results in DOMException: Failed to execute 'querySelectorAll'RequireJS fails loading required javascript with cache disabled, but only sometimesrequirejs-config, requirejs errorsIScroll not defined when loading with RequireJS?

What does the expression "A Mann!" means

How can saying a song's name be a copyright violation?

How did the Super Star Destroyer Executor get destroyed exactly?

Is it logically or scientifically possible to artificially send energy to the body?

Assassin's bullet with mercury

What does “the session was packed” mean in this context?

Why didn't Miles's spider sense work before?

Why can't we play rap on piano?

How to Recreate this in LaTeX? (Unsure What the Notation is Called)

What exploit Are these user agents trying to use?

What killed these X2 caps?

Plagiarism or not?

Why is it a bad idea to hire a hitman to eliminate most corrupt politicians?

What's the in-universe reasoning behind sorcerers needing material components?

How can I deal with my CEO asking me to hire someone with a higher salary than me, a co-founder?

Forgetting the musical notes while performing in concert

I would say: "You are another teacher", but she is a woman and I am a man

Avoiding direct proof while writing proof by induction

Is it acceptable for a professor to tell male students to not think that they are smarter than female students?

Can compressed videos be decoded back to their uncompresed original format?

What mechanic is there to disable a threat instead of killing it?

When is человек used as the word man instead of человек

Determining Impedance With An Antenna Analyzer

Why doesn't using multiple commands with a || or && conditional work?



RequireJS components sometimes not loading


Magento2 not reading my requirejs-config.jsMagento 2 RequireJs callback not calledRequirejs shim option not workingMagento 2 from Bitnami on Amazon Lightsail VPS servers won't upgrade and requires reindexing all the timeProblems moving magento2 from shared cpanel to dedicated Centos 6 LAMP serverrequirejs-config.js compiling with wrong codeRequireJs magento2 loading custom js plugin results in DOMException: Failed to execute 'querySelectorAll'RequireJS fails loading required javascript with cache disabled, but only sometimesrequirejs-config, requirejs errorsIScroll not defined when loading with RequireJS?













3















We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".



How would we go about troubleshooting and resolving the source of these issues?










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • hope fully their might be a JQuery conflict.Try to short out the conflict.

    – Mujahidh
    Jan 13 '17 at 3:57











  • Please post your js code.

    – Rakesh Jesadiya
    Jan 13 '17 at 5:12











  • The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

    – Gordon Krauthamer
    Jan 13 '17 at 14:05












  • We're observing today that the site will load the components on a normal reload, but not on a hard reload.

    – Gordon Krauthamer
    Jan 13 '17 at 14:11











  • Also, the problems seem to only occur in Magento production mode, not developer mode.

    – Gordon Krauthamer
    Jan 13 '17 at 15:17















3















We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".



How would we go about troubleshooting and resolving the source of these issues?










share|improve this question
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • hope fully their might be a JQuery conflict.Try to short out the conflict.

    – Mujahidh
    Jan 13 '17 at 3:57











  • Please post your js code.

    – Rakesh Jesadiya
    Jan 13 '17 at 5:12











  • The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

    – Gordon Krauthamer
    Jan 13 '17 at 14:05












  • We're observing today that the site will load the components on a normal reload, but not on a hard reload.

    – Gordon Krauthamer
    Jan 13 '17 at 14:11











  • Also, the problems seem to only occur in Magento production mode, not developer mode.

    – Gordon Krauthamer
    Jan 13 '17 at 15:17













3












3








3








We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".



How would we go about troubleshooting and resolving the source of these issues?










share|improve this question
















We are launching a Magento 2.1.3 site, and finding that the site will sometimes load all of its Javascript components and dependencies properly, but sometimes fails to load, in which case a slider is not displayed and the console log shows error messages such as "Uncaught TypeError: $(...).swMegamenu is not a function".



How would we go about troubleshooting and resolving the source of these issues?







magento-2.1 performance requirejs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 13 '17 at 14:11







Gordon Krauthamer

















asked Jan 13 '17 at 3:29









Gordon KrauthamerGordon Krauthamer

161




161





bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • hope fully their might be a JQuery conflict.Try to short out the conflict.

    – Mujahidh
    Jan 13 '17 at 3:57











  • Please post your js code.

    – Rakesh Jesadiya
    Jan 13 '17 at 5:12











  • The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

    – Gordon Krauthamer
    Jan 13 '17 at 14:05












  • We're observing today that the site will load the components on a normal reload, but not on a hard reload.

    – Gordon Krauthamer
    Jan 13 '17 at 14:11











  • Also, the problems seem to only occur in Magento production mode, not developer mode.

    – Gordon Krauthamer
    Jan 13 '17 at 15:17

















  • hope fully their might be a JQuery conflict.Try to short out the conflict.

    – Mujahidh
    Jan 13 '17 at 3:57











  • Please post your js code.

    – Rakesh Jesadiya
    Jan 13 '17 at 5:12











  • The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

    – Gordon Krauthamer
    Jan 13 '17 at 14:05












  • We're observing today that the site will load the components on a normal reload, but not on a hard reload.

    – Gordon Krauthamer
    Jan 13 '17 at 14:11











  • Also, the problems seem to only occur in Magento production mode, not developer mode.

    – Gordon Krauthamer
    Jan 13 '17 at 15:17
















hope fully their might be a JQuery conflict.Try to short out the conflict.

– Mujahidh
Jan 13 '17 at 3:57





hope fully their might be a JQuery conflict.Try to short out the conflict.

– Mujahidh
Jan 13 '17 at 3:57













Please post your js code.

– Rakesh Jesadiya
Jan 13 '17 at 5:12





Please post your js code.

– Rakesh Jesadiya
Jan 13 '17 at 5:12













The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

– Gordon Krauthamer
Jan 13 '17 at 14:05






The relevant code causing the error I included is: <script type="text/javascript"> require([ 'jquery', 'Smartwave_Megamenu/js/sw_megamenu' ], function ($) $(".sw-megamenu").swMegamenu(); ); </script>

– Gordon Krauthamer
Jan 13 '17 at 14:05














We're observing today that the site will load the components on a normal reload, but not on a hard reload.

– Gordon Krauthamer
Jan 13 '17 at 14:11





We're observing today that the site will load the components on a normal reload, but not on a hard reload.

– Gordon Krauthamer
Jan 13 '17 at 14:11













Also, the problems seem to only occur in Magento production mode, not developer mode.

– Gordon Krauthamer
Jan 13 '17 at 15:17





Also, the problems seem to only occur in Magento production mode, not developer mode.

– Gordon Krauthamer
Jan 13 '17 at 15:17










1 Answer
1






active

oldest

votes


















0














Hope fully their might be a JQuery conflict.Try to short out the



You can assign a variable.You should add the below line of code where swMegamenu located in.



var jq = jQuery.noConflict();


and use the variable jq instead of $ like jq(...).swMegamenu



Hope fully this might help you.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154556%2frequirejs-components-sometimes-not-loading%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Hope fully their might be a JQuery conflict.Try to short out the



    You can assign a variable.You should add the below line of code where swMegamenu located in.



    var jq = jQuery.noConflict();


    and use the variable jq instead of $ like jq(...).swMegamenu



    Hope fully this might help you.






    share|improve this answer



























      0














      Hope fully their might be a JQuery conflict.Try to short out the



      You can assign a variable.You should add the below line of code where swMegamenu located in.



      var jq = jQuery.noConflict();


      and use the variable jq instead of $ like jq(...).swMegamenu



      Hope fully this might help you.






      share|improve this answer

























        0












        0








        0







        Hope fully their might be a JQuery conflict.Try to short out the



        You can assign a variable.You should add the below line of code where swMegamenu located in.



        var jq = jQuery.noConflict();


        and use the variable jq instead of $ like jq(...).swMegamenu



        Hope fully this might help you.






        share|improve this answer













        Hope fully their might be a JQuery conflict.Try to short out the



        You can assign a variable.You should add the below line of code where swMegamenu located in.



        var jq = jQuery.noConflict();


        and use the variable jq instead of $ like jq(...).swMegamenu



        Hope fully this might help you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 13 '17 at 4:02









        MujahidhMujahidh

        1,42212036




        1,42212036



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154556%2frequirejs-components-sometimes-not-loading%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Sum ergo cogito? 1 nng

            三茅街道4182Guuntc Dn precexpngmageondP