mismatched anonymous define() module; function()return g) http://requorejs.org/docs/errors.html#mismatch

mismatched anonymous define() module; function()return g) http://requorejs.org/docs/errors.html#mismatch

{$a->নাম} - {$a->তারিখ} দ্বারা
Number of replies: 2

Hi ALL,

We are using Moodle based environment for Matomo Analytics. We get the following error as dialogue box when we log into LMS through chrome and Edge.

mismatched anonymous define() module; function()return g) http://requorejs.org/docs/errors.html#mismatch


Can you suggest solution for this error?


Regards

Priya

রেটিং এর গড়: -
In reply to priya a

Re: mismatched anonymous define() module; function()return g) http://requorejs.org/docs/errors.html#mismatch

{$a->নাম} - {$a->তারিখ} দ্বারা
Particularly helpful Moodlers এর ছবি Plugin developers এর ছবি
You are probably using a javascript library that detects the presence of require.js (which moodle uses) and assumes it is part of an AMD module.
What that really means is that you need to rewrite your JS as AMD modules.
See here: https://docs.moodle.org/dev/Javascript_Modules

I am pretty sure that you do not want to rewrite Matomo Analytics (I know nothing about it) but it might be enough to change the way you load it.