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

by 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

Average of ratings: -
In reply to priya a

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

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of 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.
Average of ratings:Useful (1)
In reply to Justin Hunt

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

by priya a -
Thanks Justin