There was a library c3.min.js which seemed to be causing problems:
I was getting: Mismatched anonymous define() module
So I followed Andrew Nichols help and he told me to pass through my javascript using Grunt
So I did: grunt amd --files=local/reporting/amd/src/c3.js
And then put a /* eslint-disable */ at the top of the file as he suggested because it was a library
It produced two files:
- local/reporting/amd/build/c3.min.js.map
- local/reporting/amd/build/c3.min.js
Uncaught ReferenceError: require is not defined
<anonymous> http://mylocal/carnegie3/src/local/reporting/classes/actions/displays/charts/view.php?actionid=39&reportid=8&charttype=line:446
moodle-core-event: Global event published: FORM_ERROR yui_combo.php:5828:31
moodle-core-event: Global event published: BLOCK_CONTENT_UPDATED yui_combo.php:5828:31
Uncaught ReferenceError: x is not defined
<anonymous> c3.js:2
Uncaught Error: No define call for local_reporting/c3
http://requirejs.org/docs/errors.html#nodefine
What do I do? I thought I did everything right? We just upgraded from 3.5 to 3.9 and I was told I need to run my javascript through grunt....