title: Moment.js: Cannot read property 'defineLocale' of undefined
body: <p>I think this is an error concerning the inclusion of Moment.js but I'm not entirely sure. I get a few errors, although I beleive they are entirely the result of the first. In full the first error is:</p>
  
  <pre><code>af.js:13 Uncaught TypeError: Cannot read property 'defineLocale' of undefined
      at af.js:13
      at af.js:9
      at af.js:10
  </code></pre>
  
  <p><code>af.js</code> is the Moment.js local configuration file, the line to which this error points is line 13 which is as shown:</p>
  
  <pre><code>var af = moment.defineLocale('af', {
  </code></pre>
  
  <p>Here is how I include it in my <code>&lt;head&gt;</code> tag (it is the penultimate <code>&lt;script&gt;</code> tag):</p>
  
  <pre><code>&lt;head&gt;
      &lt;link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"&gt;
  
      &lt;link rel="stylesheet" href="https://cdn.rawgit.com/MatthewLoveday/mq/master/mathquill.css"&gt;
      &lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css"&gt;
  
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.rawgit.com/MatthewLoveday/mq/0c20cf96/mathquill.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://www.gstatic.com/charts/loader.js"&gt;&lt;/script&gt;
  
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/locale/af.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;var MQ = MathQuill.getInterface(2);&lt;/script&gt;
  
      &lt;title&gt;Maths Site&lt;/title&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>I'm only using it in conjunction with Chart.js, but to show all my usage of Chart.js I beleive would be a bit excessive for this question.</p>