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

از priya 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

از Justin Hunt در
عکس 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.