Javascript error after upgrade from 3.3 to 3.5

Re: Javascript error after upgrade from 3.3 to 3.5

by Justin Hunt -
Number of replies: 0
Picture of Particularly helpful Moodlers Picture of Plugin developers

This can happen when a javascript library detects that AMD (Requirejs is an AMD implementation) is present, and then presents its AMD interface, which is something called an anonymous define. Since Moodle 2.9 Requirejs has been in Moodle. So its there and detectable. 

But if this library is not being loaded inside an AMD module it will fail with this error. So I think you need to rewrite your code as an AMD module, OR find the part of your code that is detecting it and tell it to stop doing that.

AMD modules in Moodle.

https://docs.moodle.org/dev/Javascript_Modules